Merge branch 'fix/1928-sign-file-logic-error' into development
commit
0e031cd06a
16
gnupg.py
16
gnupg.py
|
@ -1024,14 +1024,20 @@ class GPG(object):
|
||||||
args = ['-s']
|
args = ['-s']
|
||||||
else:
|
else:
|
||||||
args = ['-sa']
|
args = ['-sa']
|
||||||
# You can't specify detach-sign and clearsign together: gpg ignores
|
|
||||||
# the detach-sign in that case.
|
if clearsign:
|
||||||
if detach:
|
|
||||||
args.append("--detach-sign")
|
|
||||||
elif clearsign:
|
|
||||||
args.append("--clearsign")
|
args.append("--clearsign")
|
||||||
|
if detach:
|
||||||
|
logger.message(
|
||||||
|
"Cannot use --clearsign and --detach-sign simultaneously.")
|
||||||
|
logger.message(
|
||||||
|
"Using default GPG behaviour: --clearsign only.")
|
||||||
|
elif detach and not clearsign:
|
||||||
|
args.append("--detach-sign")
|
||||||
|
|
||||||
if keyid:
|
if keyid:
|
||||||
args.append('--default-key "%s"' % keyid)
|
args.append('--default-key "%s"' % keyid)
|
||||||
|
|
||||||
result = self.result_map['sign'](self)
|
result = self.result_map['sign'](self)
|
||||||
#We could use _handle_io here except for the fact that if the
|
#We could use _handle_io here except for the fact that if the
|
||||||
#passphrase is bad, gpg bails and you can't write the message.
|
#passphrase is bad, gpg bails and you can't write the message.
|
||||||
|
|
Loading…
Reference in New Issue