Reraise exceptions caught in create.py, so that the error handling in main.py

can handle it neatly.

Signed-off-by: Daniel Miles <daniel.t.miles@hp.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2006-06-01 11:57:33 +01:00
1 parent 7218286f52
commit a56b4a5a4b
1 file changed
+6 -1
+6 -1
View File
@@ -903,10 +903,15 @@ def make_domain(opts, config):
else:
err("%s" % ex.faultString)
except Exception, ex:
# main.py has good error messages that let the user know what failed.
# unless the error is a create.py specific thing, it should be handled
# at main. The purpose of this general-case 'Exception' handler is to
# clean up create.py specific processes/data but since create.py does
# not know what to do with the error, it should pass it up.
import signal
if vncpid:
os.kill(vncpid, signal.SIGKILL)
err(str(ex))
raise ex
dom = sxp.child_value(dominfo, 'name')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.