WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] remus: write circumlocution for try..exce

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] remus: write circumlocution for try..except..finally
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:11:32 +0100
Delivery-date: Thu, 16 Jun 2011 03:13:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jinsong Liu <jinsong.liu@xxxxxxxxx>
# Date 1306249945 -3600
# Node ID b04e57ec4671e15823a561e118d6e0cda6c4daa2
# Parent  07f1c287ca5e1b719bffe5f6b6429e8ae3163a35
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>
---


diff -r 07f1c287ca5e -r b04e57ec4671 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Tue May 24 15:57:24 2011 +0100
+++ b/tools/python/xen/remus/save.py    Tue May 24 16:12:25 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] remus: write circumlocution for try..except..finally, Xen patchbot-unstable <=