Get pgp public key when default keyid is unavailable

merge-requests/30/head
Bob Mottram 2021-05-05 11:13:26 +01:00
parent 61d650c6f7
commit 60aad9cfd2
1 changed files with 2 additions and 2 deletions

4
pgp.py
View File

@ -362,7 +362,7 @@ def hasLocalPGPkey() -> bool:
homeDir = str(Path.home())
gpgDir = homeDir + '/.gnupg'
if os.path.isdir(gpgDir):
keyId = _pgpLocalPublicKeyId()
keyId = pgpLocalPublicKey()
if keyId:
return True
return False
@ -428,7 +428,7 @@ def pgpLocalPublicKey() -> str:
"""
keyId = _pgpLocalPublicKeyId()
if not keyId:
return None
keyId = ''
cmdStr = "gpg --armor --export " + keyId
proc = subprocess.Popen([cmdStr],
stdout=subprocess.PIPE, shell=True)