Hid some broken output from gpg key generation

Former-commit-id: 7b1bbb84299a2693a5dd1a3018ca7aabc637f3c4
Former-commit-id: d98f1ac9192ff9c4113c0ba314f2fba1354fbe4b
This commit is contained in:
2023-05-15 11:11:13 -04:00
parent 399d89f829
commit 03f011ccd0
+2 -2
View File
@@ -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()