Put verbosity args before other options/args.
* FIXES Issue #76: https://github.com/isislovecruft/python-gnupg/issues/76fix/76-verbose-flag-order
parent
fecf92c0ac
commit
59992eb8c3
|
@ -500,11 +500,9 @@ class GPGBase(object):
|
||||||
if self.use_agent: cmd.append('--use-agent')
|
if self.use_agent: cmd.append('--use-agent')
|
||||||
else: cmd.append('--no-use-agent')
|
else: cmd.append('--no-use-agent')
|
||||||
|
|
||||||
if self.options:
|
# The arguments for debugging and verbosity should be placed into the
|
||||||
[cmd.append(opt) for opt in iter(_sanitise_list(self.options))]
|
# cmd list before the options/args in order to resolve Issue #76:
|
||||||
if args:
|
# https://github.com/isislovecruft/python-gnupg/issues/76
|
||||||
[cmd.append(arg) for arg in iter(_sanitise_list(args))]
|
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
cmd.append('--debug-all')
|
cmd.append('--debug-all')
|
||||||
|
|
||||||
|
@ -517,6 +515,11 @@ class GPGBase(object):
|
||||||
else:
|
else:
|
||||||
cmd.append('--debug-level %s' % self.verbose)
|
cmd.append('--debug-level %s' % self.verbose)
|
||||||
|
|
||||||
|
if self.options:
|
||||||
|
[cmd.append(opt) for opt in iter(_sanitise_list(self.options))]
|
||||||
|
if args:
|
||||||
|
[cmd.append(arg) for arg in iter(_sanitise_list(args))]
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
def _open_subprocess(self, args=None, passphrase=False):
|
def _open_subprocess(self, args=None, passphrase=False):
|
||||||
|
|
Loading…
Reference in New Issue