Rev4017, Fix Bigfile test, Python 3.4 compatibility

This commit is contained in:
shortcutme 2019-03-21 02:48:21 +01:00
parent 60405bf222
commit a82ee338ef
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
3 changed files with 6 additions and 3 deletions

View file

@ -264,7 +264,10 @@ class ContentManagerPlugin(object):
file_out.close()
mt.make_tree()
return mt.get_merkle_root(), piece_size, {
merkle_root = mt.get_merkle_root()
if type(merkle_root) is bytes: # Python <3.5
merkle_root = merkle_root.decode()
return merkle_root, piece_size, {
"sha512_pieces": piece_hashes
}