xm: fix up exception handling when spawning vnc viewer.

From: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-08-04 11:06:31 +01:00
1 parent e7c388db06
commit f06e832088
1 file changed
+2 -4
+2 -4
View File
@@ -40,14 +40,12 @@ class OurXenstoreConnection:
while True:
result = self.handle.read('0', path)
if result is not None:
signal.alarm(0)
return result
self.handle.read_watch()
self.handle.unwatch(path, watch)
signal.alarm(0)
except:
finally:
signal.alarm(0)
if watch is not None: self.handle.unwatch(path, watch)
raise
def read_maybe(self, path):
return self.handle.read('0', path)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.