Merge branch 'fix/44-verbose-arg' into develop

fix/66-keyrevoked
Isis Lovecruft 2014-09-26 02:52:27 +00:00
commit 08370fbc02
No known key found for this signature in database
GPG Key ID: 18C16EC5F9F1D673
1 changed files with 9 additions and 4 deletions

View File

@ -497,10 +497,15 @@ class GPGBase(object):
if self.verbose:
cmd.append('--debug-all')
if ((isinstance(self.verbose, str) and
self.verbose in ['basic', 'advanced', 'expert', 'guru'])
or (isinstance(self.verbose, int) and (self.verbose>=1))):
cmd.append('--debug-level=%s' % self.verbose)
if (isinstance(self.verbose, str) or
(isinstance(self.verbose, int) and (self.verbose >= 1))):
# GnuPG<=1.4.18 parses the `--debug-level` command in a way
# that is incompatible with all other GnuPG versions. :'(
if self.binary_version and (self.binary_version <= '1.4.18'):
cmd.append('--debug-level=%s' % self.verbose)
else:
cmd.append('--debug-level %s' % self.verbose)
return cmd