Again, _result_map is a private attribute.
parent
af996b8a69
commit
a17b8828c1
|
@ -823,7 +823,7 @@ class GPG(object):
|
||||||
args = ['--symmetric']
|
args = ['--symmetric']
|
||||||
else:
|
else:
|
||||||
args = ['--encrypt']
|
args = ['--encrypt']
|
||||||
if not _is_sequence(recipients):
|
if not util._is_list_or_tuple(recipients):
|
||||||
recipients = (recipients,)
|
recipients = (recipients,)
|
||||||
for recipient in recipients:
|
for recipient in recipients:
|
||||||
args.append('--recipient "%s"' % recipient)
|
args.append('--recipient "%s"' % recipient)
|
||||||
|
@ -837,7 +837,7 @@ class GPG(object):
|
||||||
args.append('--sign --default-key "%s"' % sign)
|
args.append('--sign --default-key "%s"' % sign)
|
||||||
if always_trust:
|
if always_trust:
|
||||||
args.append("--always-trust")
|
args.append("--always-trust")
|
||||||
result = self.result_map['crypt'](self)
|
result = self._result_map['crypt'](self)
|
||||||
self._handle_io(args, file, result, passphrase=passphrase, binary=True)
|
self._handle_io(args, file, result, passphrase=passphrase, binary=True)
|
||||||
logger.debug('encrypt result: %r', result.data)
|
logger.debug('encrypt result: %r', result.data)
|
||||||
return result
|
return result
|
||||||
|
@ -916,7 +916,7 @@ class GPG(object):
|
||||||
args.append('--output "%s"' % output)
|
args.append('--output "%s"' % output)
|
||||||
if always_trust:
|
if always_trust:
|
||||||
args.append("--always-trust")
|
args.append("--always-trust")
|
||||||
result = self.result_map['crypt'](self)
|
result = self._result_map['crypt'](self)
|
||||||
self._handle_io(args, file, result, passphrase, binary=True)
|
self._handle_io(args, file, result, passphrase, binary=True)
|
||||||
logger.debug('decrypt result: %r', result.data)
|
logger.debug('decrypt result: %r', result.data)
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in New Issue