[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Silence log message when trying to unregister a watch that's already been
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Node ID 07e3f39eaf10f098058497e72f7cd828fa44562b # Parent 53795f0a41b116d0fb428bd3ee4a099b42fca97f Silence log message when trying to unregister a watch that's already been unregistered -- this is not a problem. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- tools/python/xen/xend/xenstore/xswatch.py | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletion(-) diff -r 53795f0a41b1 -r 07e3f39eaf10 tools/python/xen/xend/xenstore/xswatch.py --- a/tools/python/xen/xend/xenstore/xswatch.py Wed Nov 29 12:16:59 2006 +0000 +++ b/tools/python/xen/xend/xenstore/xswatch.py Wed Nov 29 12:14:45 2006 +0000 @@ -5,6 +5,7 @@ # Public License. See the file "COPYING" in the main directory of # this archive for more details. +import errno import threading from xen.xend.xenstore.xsutil import xshandle @@ -65,7 +66,15 @@ def watchMain(): watch = we[1] res = watch.fn(we[0], *watch.args, **watch.kwargs) if not res: - watch.unwatch() + try: + watch.unwatch() + except RuntimeError, exn: + if exn.args[0] == errno.ENOENT: + # The watch has already been unregistered -- that's + # fine. + pass + else: + raise except: log.exception("read_watch failed") # Ignore this exception -- there's no point throwing it _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |