no-use-agent is obsolete for GPG2

(cherry picked from commit 19fd35c7232e42a4112c8f18686df1c0407c2d0d)
Signed-off-by: Isis Lovecruft <isis@leap.se>

 * FIXES #96.
 * CLOSES #96.
 * CLOSES #46.
fix/96-no-use-agent
Thomas Tanner 2013-11-14 23:11:32 +01:00 committed by Isis Lovecruft
parent d3b7dd0353
commit d3e6ae33b4
2 changed files with 4 additions and 1 deletions

View File

@ -538,7 +538,7 @@ 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')
elif self.use_agent==False: cmd.append('--no-use-agent') # obsolete for GPG 2.0
# 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,9 @@ class GPG(GPGBase):
# fatal error (at least it does with GnuPG>=2.0.0):
self.create_trustdb()
# --no-use-agent is obsolete
if not self.use_agent: self.use_agent = None
@functools.wraps(_trust._create_trustdb)
def create_trustdb(self):
if self.is_gpg2():