Changed checking for VM name in use
In near future the old way will stop working, so this is a pre-emptive fix.
This commit is contained in:
parent
afa9ebd728
commit
b19d9e1373
@ -135,12 +135,10 @@ class NewVmDlg(QtGui.QDialog, Ui_NewVMDlg):
|
|||||||
else 'StandaloneVM')
|
else 'StandaloneVM')
|
||||||
|
|
||||||
name = str(self.name.text())
|
name = str(self.name.text())
|
||||||
try:
|
|
||||||
self.app.domains[name]
|
if name in self.app.domains:
|
||||||
except LookupError:
|
QtGui.QMessageBox.warning(
|
||||||
pass
|
None,
|
||||||
else:
|
|
||||||
QtGui.QMessageBox.warning(None,
|
|
||||||
self.tr('Incorrect qube name!'),
|
self.tr('Incorrect qube name!'),
|
||||||
self.tr('A qube with the name <b>{}</b> already exists in the '
|
self.tr('A qube with the name <b>{}</b> already exists in the '
|
||||||
'system!').format(name))
|
'system!').format(name))
|
||||||
|
Loading…
Reference in New Issue
Block a user