Merge remote-tracking branch 'origin/pr/158'

* origin/pr/158:
  Fixed error in displaying error on VM Rename
Этот коммит содержится в:
Marek Marczykowski-Górecki 2019-02-26 23:12:35 +01:00
родитель 94cefc9d09 26779a4826
Коммит 7874aa73fe
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 063938BA42CFA724

Просмотреть файл

@ -68,22 +68,18 @@ class RenameVMThread(QtCore.QThread):
setattr(holder, prop, new_vm)
except qubesadmin.exc.QubesException:
failed_props += [(holder, prop)]
if not failed_props:
del self.vm.app.domains[self.vm.name]
else:
list_text = utils.format_dependencies_list(failed_props)
QtGui.QMessageBox.warning(
None,
self.tr("Warning: rename partially unsuccessful"),
self.tr("Some properties could not be changed to the new "
"name. The system has now both {} and {} qubes. "
"To resolve this, please check and change the "
"following properties and remove the qube {} "
"manually.<br> ").format(
self.vm.name, self.vm.name, self.vm.name)\
+ list_text)
self.msg = (self.tr("Warning: rename partially unsuccessful!"),
self.tr("Some properties could not be changed to "
"the new name. The system has now both {} "
"and {} qubes. To resolve this, please "
"check and change the following properties "
"and remove the qube {} manually.<br>"
).format(self.vm.name, self.vm.name,
self.vm.name) + list_text)
except qubesadmin.exc.QubesException as ex:
self.msg = ("Rename error!", str(ex))