From: Greg Price Date: Wed, 23 Jul 2008 05:10:21 +0000 (-0400) Subject: xenstore isn't even consistent in what happens on error X-Git-Tag: sipb-xen-remctl-auto/1.0.20~9 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/commitdiff_plain/339e69bbd0dc15aa9cc1c02f53030af4671f844b?ds=inline;hp=bb817ab6a7535279e1a6432fb0be2ebfc28116ce xenstore isn't even consistent in what happens on error Usually when the VM is gone and xsc.ls('', '/vm/..uuid..') would return empty, an xsc.ls('', '/vm/..uuid../start_time') returns None. But sometimes it throws an xs.lowlevel.xs.Error, saying 22, 'Invalid argument', instead. svn path=/trunk/packages/sipb-xen-remctl-auto/; revision=717 --- diff --git a/files/usr/sbin/sipb-xen-listvms b/files/usr/sbin/sipb-xen-listvms index 4daa953..79762fa 100755 --- a/files/usr/sbin/sipb-xen-listvms +++ b/files/usr/sbin/sipb-xen-listvms @@ -16,7 +16,7 @@ def live_vms(): for domid in domids: try: name, data = get_dom(int(domid)) - except TypeError: + except (xs.Error, TypeError): continue # went down since we started if name.startswith('d_'): name = name[2:]