backups/qvm-tools: decode password using console encoding

This commit is contained in:
Marek Marczykowski-Górecki 2014-02-05 06:53:07 +01:00
parent 8dbc417642
commit 4ff39859c4
2 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,8 @@ def main():
print >>sys.stderr, "ERROR: Password mismatch"
exit(1)
passphrase = passphrase.decode(sys.stdin.encoding)
kwargs = {}
if options.hmac_algorithm:
kwargs['hmac_algorithm'] = options.hmac_algorithm

View File

@ -26,6 +26,7 @@ from qubes.backup import backup_restore_header
from qubes.backup import backup_restore_prepare
from qubes.backup import backup_restore_print_summary
from qubes.backup import backup_restore_do
import sys
from optparse import OptionParser
import os
@ -109,6 +110,7 @@ def main():
exit(1)
passphrase = getpass.getpass("Please enter the pass phrase that will be used to decrypt/verify the backup: ")
passphrase = passphrase.decode(sys.stdin.encoding)
print >> sys.stderr, "Checking backup content..."