From ebf64828e1eaf0e36aa303a9a99b738064909da5 Mon Sep 17 00:00:00 2001 From: Feike Steenbergen Date: Fri, 2 Sep 2016 16:37:06 +0200 Subject: [PATCH] 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' --- patroni/scripts/wale_restore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/scripts/wale_restore.py b/patroni/scripts/wale_restore.py index 4383e986..28eefe2e 100755 --- a/patroni/scripts/wale_restore.py +++ b/patroni/scripts/wale_restore.py @@ -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