mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
e7c388db06
commit
f06e832088
1 file changed
+2
-4
@@ -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)
|
||||
|
||||
|
||||