virtManager: Remove some unnecessary generatename collidelist usage
The libvirt callbacks will handle this for us already
This commit is contained in:
parent
6e6a0b8a6a
commit
58dfe05344
|
@ -1497,8 +1497,7 @@ class vmmCreate(vmmGObjectUI):
|
|||
return virtinst.generatename.generate_name(basename,
|
||||
self.conn.get_backend().lookupByName,
|
||||
start_num=force_num and 1 or 2, force_num=force_num,
|
||||
sep=not force_num and "-" or "",
|
||||
collidelist=[vm.get_name() for vm in self.conn.list_vms()])
|
||||
sep=not force_num and "-" or "")
|
||||
|
||||
|
||||
def _validate_install_page(self):
|
||||
|
|
|
@ -117,12 +117,10 @@ class vmmSnapshotNew(vmmGObjectUI):
|
|||
self.widget("snapshot-new-description").set_buffer(buf)
|
||||
|
||||
def _reset_state(self):
|
||||
collidelist = [s.get_xmlobj().name for s in self.vm.list_snapshots()]
|
||||
basename = "snapshot"
|
||||
cb = self.vm.get_backend().snapshotLookupByName
|
||||
default_name = generatename.generate_name(
|
||||
basename, cb, sep="", start_num=1, force_num=True,
|
||||
collidelist=collidelist)
|
||||
basename, cb, sep="", start_num=1, force_num=True)
|
||||
|
||||
self.widget("snapshot-new-name").set_text(default_name)
|
||||
self.widget("snapshot-new-name").emit("changed")
|
||||
|
|
Loading…
Reference in New Issue