mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
Remove unnecessary nested try block.
This nested block has been added by python-virtinst's commit 4a9664634dd5ae65ed92b59b1f1543633c7d8112, aparently without need.
This commit is contained in:
parent
0f8ea6eaa6
commit
576721d8b2
@ -1228,29 +1228,28 @@ class StorageVolume(StorageObject):
|
||||
meter = urlgrabber.progress.BaseMeter()
|
||||
|
||||
try:
|
||||
try:
|
||||
self._install_finished = False
|
||||
t.start()
|
||||
meter.start(size=self.capacity,
|
||||
text=_("Allocating '%s'") % self.name)
|
||||
self._install_finished = False
|
||||
t.start()
|
||||
meter.start(size=self.capacity,
|
||||
text=_("Allocating '%s'") % self.name)
|
||||
|
||||
if self.input_vol:
|
||||
vol = self.pool.createXMLFrom(xml, self.input_vol, 0)
|
||||
else:
|
||||
vol = self.pool.createXML(xml, 0)
|
||||
if self.input_vol:
|
||||
vol = self.pool.createXMLFrom(xml, self.input_vol, 0)
|
||||
else:
|
||||
vol = self.pool.createXML(xml, 0)
|
||||
|
||||
meter.end(self.capacity)
|
||||
logging.debug("Storage volume '%s' install complete.",
|
||||
self.name)
|
||||
return vol
|
||||
except libvirt.libvirtError, e:
|
||||
if support.is_error_nosupport(e):
|
||||
raise RuntimeError("Libvirt version does not support "
|
||||
"storage cloning.")
|
||||
raise
|
||||
except Exception, e:
|
||||
raise RuntimeError("Couldn't create storage volume "
|
||||
"'%s': '%s'" % (self.name, str(e)))
|
||||
meter.end(self.capacity)
|
||||
logging.debug("Storage volume '%s' install complete.",
|
||||
self.name)
|
||||
return vol
|
||||
except libvirt.libvirtError, e:
|
||||
if support.is_error_nosupport(e):
|
||||
raise RuntimeError("Libvirt version does not support "
|
||||
"storage cloning.")
|
||||
raise
|
||||
except Exception, e:
|
||||
raise RuntimeError("Couldn't create storage volume "
|
||||
"'%s': '%s'" % (self.name, str(e)))
|
||||
finally:
|
||||
self._install_finished = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user