From 339e69bbd0dc15aa9cc1c02f53030af4671f844b Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 23 Jul 2008 01:10:21 -0400 Subject: [PATCH 1/1] 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 --- files/usr/sbin/sipb-xen-listvms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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:] -- 1.7.9.5