[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] remus: write circumlocution for try..except..finally



# HG changeset patch
# User Jinsong Liu <jinsong.liu@xxxxxxxxx>
# Date 1314721392 -3600
# Node ID a0fe53f00a7d0a352005c62c58e29161c266153d
# Parent  b29552e599c817b0e4debb239e79e21278130790
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@xxxxxxxxx>
Acked-by: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

xen-unstable changeset: 23379:b04e57ec4671
Backport-requested-by: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r b29552e599c8 -r a0fe53f00a7d tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Tue Aug 30 17:23:10 2011 +0100
+++ b/tools/python/xen/remus/save.py    Tue Aug 30 17:23:12 2011 +0100
@@ -161,11 +161,12 @@
 
         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()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.