gpg: parse_packets() should get file-like stream

and wrap it with util.Reader()
This commit is contained in:
Roman Zeyde
2016-07-22 21:45:13 +03:00
parent e70f0ec681
commit ccdbc7abfc
2 changed files with 10 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ zpR9luXTKwMEl+mlZmwEFKZXBmir
=oyj0
-----END PGP PUBLIC KEY BLOCK-----
'''
stream = util.Reader(io.BytesIO(decode.remove_armor(data)))
stream = io.BytesIO(decode.remove_armor(data))
pubkey, user_id, signature = list(decode.parse_packets(stream))
expected_pubkey = {
'created': 1464355030, 'type': 'pubkey', 'tag': 6,