createpool: Fix destructive pool building

Any time we would prompt when building a pool, we weren't properly setting
up the Pool object, so build/install would always fail.
This commit is contained in:
Cole Robinson 2010-06-14 13:37:13 -04:00
parent 4b36667440
commit bf5cb99b5a

View File

@ -508,9 +508,12 @@ class vmmCreatePool(gobject.GObject):
buildval = self.window.get_widget("pool-build").get_active()
buildsen = self.window.get_widget("pool-build").get_property("sensitive")
if buildsen and buildval:
return self.err.yes_no(_("Building a pool of this type will "
ret = self.err.yes_no(_("Building a pool of this type will "
"format the source device. Are you "
"sure you want to 'build' this pool?"))
if not ret:
return ret
self._pool = tmppool
return True