Fix TC_01_Properties/test_030_rename_conflict_app
This commit is contained in:
parent
d1d72466d6
commit
ebb79e9c4f
@ -31,7 +31,6 @@ import datetime
|
|||||||
import itertools
|
import itertools
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import pipes
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -497,10 +496,12 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
|||||||
else:
|
else:
|
||||||
shutil.copy(new_label.icon_path, self.icon_path)
|
shutil.copy(new_label.icon_path, self.icon_path)
|
||||||
|
|
||||||
|
|
||||||
@qubes.events.handler('property-pre-set:name')
|
@qubes.events.handler('property-pre-set:name')
|
||||||
def on_property_pre_set_name(self, event, name, newvalue, oldvalue=None):
|
def on_property_pre_set_name(self, event, name, newvalue, oldvalue=None):
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
|
if newvalue in [d.name for d in self.app.domains.values()]:
|
||||||
|
raise qubes.exc.QubesValueError(
|
||||||
|
"A domain with name %s already exists", newvalue)
|
||||||
|
|
||||||
# TODO not self.is_stopped() would be more appropriate
|
# TODO not self.is_stopped() would be more appropriate
|
||||||
if self.is_running():
|
if self.is_running():
|
||||||
|
Loading…
Reference in New Issue
Block a user