backups: fix unicode handling in passphrase and backup path
Convert from QString to unicode, not str object.
This commit is contained in:
parent
89280d0283
commit
53433bc47d
@ -286,9 +286,9 @@ class BackupVMsWindow(Ui_Backup, QWizard):
|
||||
msg = []
|
||||
|
||||
try:
|
||||
backup.backup_do(str(self.dir_line_edit.text()),
|
||||
backup.backup_do(unicode(self.dir_line_edit.text()),
|
||||
self.files_to_backup,
|
||||
str(self.passphrase_line_edit.text()),
|
||||
unicode(self.passphrase_line_edit.text()),
|
||||
progress_callback=self.update_progress_bar,
|
||||
encrypted=self.encryption_checkbox.isChecked(),
|
||||
appvm=self.target_appvm)
|
||||
|
@ -240,7 +240,7 @@ def select_path_button_clicked(dialog, select_file = False):
|
||||
else '/')
|
||||
|
||||
if new_path != None:
|
||||
new_path = str(new_path)
|
||||
new_path = unicode(new_path)
|
||||
if os.path.basename(new_path) == 'qubes.xml':
|
||||
backup_location = os.path.dirname(new_path)
|
||||
else:
|
||||
|
@ -138,8 +138,8 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
||||
|
||||
try:
|
||||
self.vms_to_restore = backup.backup_restore_prepare(
|
||||
str(self.dir_line_edit.text()),
|
||||
str(self.passphrase_line_edit.text()),
|
||||
unicode(self.dir_line_edit.text()),
|
||||
unicode(self.passphrase_line_edit.text()),
|
||||
options=self.restore_options,
|
||||
host_collection=self.qvm_collection,
|
||||
encrypted=self.encryption_checkbox.isChecked(),
|
||||
@ -276,7 +276,7 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
||||
self.done(0)
|
||||
|
||||
def has_selected_dir(self):
|
||||
backup_location = str(self.dir_line_edit.text())
|
||||
backup_location = unicode(self.dir_line_edit.text())
|
||||
if not backup_location:
|
||||
return False
|
||||
if self.appvm_combobox.currentIndex() == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user