mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
remus: write circumlocution for try..except..finally
Parsing /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl
File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line 169
finally:
^
SyntaxError: invalid syntax
This was introduced in 23195:13ec53a59a42
It is a problem for Python 2.4 and earlier, only.
So use try...(try...except)...finally as suggested by Ian Campbell.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
3b6eaa3e34
commit
2cb4424e3a
1 file changed
+6
-5
@@ -161,11 +161,12 @@ class Saver(object):
|
||||
|
||||
self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
|
||||
try:
|
||||
self.checkpointer.open(self.vm.domid)
|
||||
self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
|
||||
self.checkpointcb, self.interval)
|
||||
except xen.lowlevel.checkpoint.error, e:
|
||||
raise CheckpointError(e)
|
||||
try:
|
||||
self.checkpointer.open(self.vm.domid)
|
||||
self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
|
||||
self.checkpointcb, self.interval)
|
||||
except xen.lowlevel.checkpoint.error, e:
|
||||
raise CheckpointError(e)
|
||||
finally:
|
||||
try: #errors in checkpoint close are not critical atm.
|
||||
self.checkpointer.close()
|
||||
|
||||