Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/158'
Browse files Browse the repository at this point in the history
* origin/pr/158:
  Fixed error in displaying error on VM Rename
  • Loading branch information
marmarek committed Feb 26, 2019
2 parents 94cefc9 + 26779a4 commit 7874aa7
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions qubesmanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,18 @@ def run(self):
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))
Expand Down

0 comments on commit 7874aa7

Please sign in to comment.