diff --git a/lib/stweak.py b/lib/stweak.py index 3ebb7a9..eb69da2 100644 --- a/lib/stweak.py +++ b/lib/stweak.py @@ -9,7 +9,7 @@ from random import randint from re import sub from shutil import get_terminal_size, which from sshyp import copy_id_check, string_gen -from subprocess import PIPE, run +from subprocess import DEVNULL, PIPE, run # PORT START UNAME-IMPORT-STWEAK from os import uname # PORT END UNAME-IMPORT-STWEAK @@ -122,7 +122,7 @@ def gpg_config(): 'Key-Type: 1\n', 'Key-Length: 4096\n', 'Key-Usage: sign encrypt\n', 'Name-Real: sshyp\n', 'Name-Comment: gpg-sshyp\n', 'Name-Email: github.com/rwinkhart/sshyp\n', 'Expire-Date: 0']) - run(['gpg', '--batch', '--generate-key', f"{home}/.config/sshyp/gpg-gen"]) + run(['gpg', '--batch', '--generate-key', f"{home}/.config/sshyp/gpg-gen"], stdout=DEVNULL, stderr=DEVNULL) remove(f"{home}/.config/sshyp/gpg-gen") _gpg_id = run(['gpg', '-k'], stdout=PIPE, text=True).stdout.splitlines()[-3].strip()