Decode output from wal-e list backup

When running this script using Python3, the output is bytestring instead of string.
We explicitly decode it to ensure checks further down are ok.

The trigger for this patch is:

ERROR: unable to get some of WALE backup parameters: 'expanded_size_bytes'
This commit is contained in:
Feike Steenbergen
2016-09-02 16:37:06 +02:00
parent 19c80df442
commit ebf64828e1
+1 -1
View File
@@ -73,7 +73,7 @@ class WALERestore(object):
# base_00000001000000000000007F_00000040 2015-05-18T10:13:25.000Z
# 20310671 00000001000000000000007F 00000040
# 00000001000000000000007F 00000240
backup_strings = latest_backup.splitlines() if latest_backup else ()
backup_strings = latest_backup.decode('utf-8').splitlines() if latest_backup else ()
if len(backup_strings) != 2:
return False