Use extend instead of append to fix list problem.
This commit is contained in:
parent
e4b5a0e979
commit
04afea12cf
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ def encrypt_all_payloads( message, gpg_to_cmdline ):
|
|||
return encrypt_payload( message, gpg_to_cmdline ).get_payload()
|
||||
for payload in message.get_payload():
|
||||
if( type( payload.get_payload() ) == list ):
|
||||
encrypted_payloads.append( encrypt_all_payloads( payload, gpg_to_cmdline ) )
|
||||
encrypted_payloads.extend( encrypt_all_payloads( payload, gpg_to_cmdline ) )
|
||||
else:
|
||||
encrypted_payloads.append( encrypt_payload( payload, gpg_to_cmdline ) )
|
||||
return encrypted_payloads
|
||||
|
|
Loading…
Reference in a new issue