From 8dbc417642fcede02b159d8b8e94d0c47097f500 Mon Sep 17 00:00:00 2001 From: Danny Fullerton Date: Wed, 5 Feb 2014 06:51:47 +0100 Subject: [PATCH] backups: Fix backup's passphrase unicode encoding issue --- core/backup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/backup.py b/core/backup.py index fe8e1ecb..a6aafbba 100644 --- a/core/backup.py +++ b/core/backup.py @@ -382,6 +382,7 @@ def backup_do(base_backup_dir, files_to_backup, passphrase, compressed=False, hmac_algorithm=DEFAULT_HMAC_ALGORITHM, crypto_algorithm=DEFAULT_CRYPTO_ALGORITHM): total_backup_sz = 0 + passphrase = passphrase.encode('utf-8') for file in files_to_backup: total_backup_sz += file["size"] @@ -923,6 +924,7 @@ def restore_vm_dirs (backup_source, restore_tmpdir, passphrase, vms_dirs, vms, print_callback("Working in temporary dir:"+restore_tmpdir) print_callback("Extracting data: " + size_to_human(vms_size)+" to restore") + passphrase = passphrase.encode('utf-8') header_data = None vmproc = None if appvm != None: