Only process safe_args in gnupg.GPG.__init__() as a dict if it is one.

feature/documentation-builds-dirhtml
Isis Lovecruft 2013-03-14 12:40:51 +00:00 committed by Isis Lovecruft
parent c0265943e2
commit 45cb40c8b1
1 changed files with 5 additions and 4 deletions

View File

@ -1139,10 +1139,11 @@ class GPG(object):
cmd.extend(self.options)
if args:
safe_args = _sanitise(args)
for key, value in safe_args:
cmd.extend(_hyphenate(key, add_prefix=True))
if value is not True:
cmd.extend(_hyphenate(value))
if isinstance(safe_args, dict):
for key, value in safe_args:
cmd.extend(_hyphenate(key, add_prefix=True))
if value is not True:
cmd.extend(_hyphenate(value))
return cmd
def _open_subprocess(self, args, passphrase=False):