Merge branch 'fix/96-no-use-agent' into develop

fix/98-pinentry-launched
Isis Lovecruft 2015-03-09 08:45:22 +00:00
commit 5d03c3c5eb
No known key found for this signature in database
GPG Key ID: 18C16EC5F9F1D673
2 changed files with 8 additions and 2 deletions

View File

@ -537,8 +537,8 @@ class GPGBase(object):
if passphrase: cmd.append('--batch --passphrase-fd 0')
if self.use_agent: cmd.append('--use-agent')
else: cmd.append('--no-use-agent')
if self.use_agent is True: cmd.append('--use-agent')
elif self.use_agent is False: cmd.append('--no-use-agent')
# The arguments for debugging and verbosity should be placed into the
# cmd list before the options/args in order to resolve Issue #76:

View File

@ -161,6 +161,12 @@ class GPG(GPGBase):
# fatal error (at least it does with GnuPG>=2.0.0):
self.create_trustdb()
# The --no-use-agent and --use-agent options were deprecated in GnuPG
# 2.x, so we should set use_agent to None here to avoid having
# GPGBase._make_args() add either one.
if self.is_gpg2():
self.use_agent = None
@functools.wraps(_trust._create_trustdb)
def create_trustdb(self):
if self.is_gpg2():