ia64/xen-unstable

changeset 14540:238ed1c75194

Ignore exceptions in the get_all_methods call.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Fri Mar 23 17:42:08 2007 +0000 (2007-03-23)
parents f434c63b484a
children 94943f2e1de9
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Fri Mar 23 17:14:22 2007 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Fri Mar 23 17:42:08 2007 +0000
     1.3 @@ -579,9 +579,12 @@ class Shell(cmd.Cmd):
     1.4          cmd.Cmd.__init__(self)
     1.5          self.prompt = "xm> "
     1.6          if serverType == SERVER_XEN_API:
     1.7 -            res = server.xenapi._UNSUPPORTED_list_all_methods()
     1.8 -            for f in res:
     1.9 -                setattr(Shell, 'do_' + f + ' ', self.default)
    1.10 +            try:
    1.11 +                res = server.xenapi._UNSUPPORTED_list_all_methods()
    1.12 +                for f in res:
    1.13 +                    setattr(Shell, 'do_' + f + ' ', self.default)
    1.14 +            except:
    1.15 +                pass
    1.16  
    1.17      def preloop(self):
    1.18          cmd.Cmd.preloop(self)