ia64/xen-unstable

changeset 10318:057c5554f8c3

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>
author emellor@leeni.uk.xensource.com
date Thu Jun 01 11:57:33 2006 +0100 (2006-06-01)
parents f99ba86ad96b
children 647d012b9a36
files tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xm/create.py	Thu Jun 01 11:47:00 2006 +0100
     1.2 +++ b/tools/python/xen/xm/create.py	Thu Jun 01 11:57:33 2006 +0100
     1.3 @@ -903,10 +903,15 @@ def make_domain(opts, config):
     1.4          else:
     1.5              err("%s" % ex.faultString)
     1.6      except Exception, ex:
     1.7 +        # main.py has good error messages that let the user know what failed.
     1.8 +        # unless the error is a create.py specific thing, it should be handled
     1.9 +        # at main. The purpose of this general-case 'Exception' handler is to
    1.10 +        # clean up create.py specific processes/data but since create.py does
    1.11 +        # not know what to do with the error, it should pass it up.
    1.12          import signal
    1.13          if vncpid:
    1.14              os.kill(vncpid, signal.SIGKILL)
    1.15 -        err(str(ex))
    1.16 +        raise ex
    1.17  
    1.18      dom = sxp.child_value(dominfo, 'name')
    1.19