]> xenbits.xensource.com Git - xen.git/commitdiff
Ignore exceptions in the get_all_methods call.
authorEwan Mellor <ewan@xensource.com>
Fri, 23 Mar 2007 17:42:08 +0000 (17:42 +0000)
committerEwan Mellor <ewan@xensource.com>
Fri, 23 Mar 2007 17:42:08 +0000 (17:42 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xm/main.py

index 2f18ae2304e44ffaa78816e016e84770a06a6e61..35930a529ad8ce46439062e6b84325fa495b2b94 100644 (file)
@@ -579,9 +579,12 @@ class Shell(cmd.Cmd):
         cmd.Cmd.__init__(self)
         self.prompt = "xm> "
         if serverType == SERVER_XEN_API:
-            res = server.xenapi._UNSUPPORTED_list_all_methods()
-            for f in res:
-                setattr(Shell, 'do_' + f + ' ', self.default)
+            try:
+                res = server.xenapi._UNSUPPORTED_list_all_methods()
+                for f in res:
+                    setattr(Shell, 'do_' + f + ' ', self.default)
+            except:
+                pass
 
     def preloop(self):
         cmd.Cmd.preloop(self)