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 = []
|
msg = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
backup.backup_do(str(self.dir_line_edit.text()),
|
backup.backup_do(unicode(self.dir_line_edit.text()),
|
||||||
self.files_to_backup,
|
self.files_to_backup,
|
||||||
str(self.passphrase_line_edit.text()),
|
unicode(self.passphrase_line_edit.text()),
|
||||||
progress_callback=self.update_progress_bar,
|
progress_callback=self.update_progress_bar,
|
||||||
encrypted=self.encryption_checkbox.isChecked(),
|
encrypted=self.encryption_checkbox.isChecked(),
|
||||||
appvm=self.target_appvm)
|
appvm=self.target_appvm)
|
||||||
|
@ -240,7 +240,7 @@ def select_path_button_clicked(dialog, select_file = False):
|
|||||||
else '/')
|
else '/')
|
||||||
|
|
||||||
if new_path != None:
|
if new_path != None:
|
||||||
new_path = str(new_path)
|
new_path = unicode(new_path)
|
||||||
if os.path.basename(new_path) == 'qubes.xml':
|
if os.path.basename(new_path) == 'qubes.xml':
|
||||||
backup_location = os.path.dirname(new_path)
|
backup_location = os.path.dirname(new_path)
|
||||||
else:
|
else:
|
||||||
|
@ -138,8 +138,8 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.vms_to_restore = backup.backup_restore_prepare(
|
self.vms_to_restore = backup.backup_restore_prepare(
|
||||||
str(self.dir_line_edit.text()),
|
unicode(self.dir_line_edit.text()),
|
||||||
str(self.passphrase_line_edit.text()),
|
unicode(self.passphrase_line_edit.text()),
|
||||||
options=self.restore_options,
|
options=self.restore_options,
|
||||||
host_collection=self.qvm_collection,
|
host_collection=self.qvm_collection,
|
||||||
encrypted=self.encryption_checkbox.isChecked(),
|
encrypted=self.encryption_checkbox.isChecked(),
|
||||||
@ -276,7 +276,7 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
|||||||
self.done(0)
|
self.done(0)
|
||||||
|
|
||||||
def has_selected_dir(self):
|
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:
|
if not backup_location:
|
||||||
return False
|
return False
|
||||||
if self.appvm_combobox.currentIndex() == 0:
|
if self.appvm_combobox.currentIndex() == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user