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] Protect __del__ from failure inside __init__ by setting

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Protect __del__ from failure inside __init__ by setting inTransaction before
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Oct 2005 12:08:21 +0000
Delivery-date: Wed, 19 Oct 2005 12:07:13 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 6ef7386f7370dc4a7b314acedb410e29aa8450c0
# Parent  c24fae1cd39d21d39ec0144b4fd0b9a1f396e073
Protect __del__ from failure inside __init__ by setting inTransaction before
trying to create a transaction instance.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r c24fae1cd39d -r 6ef7386f7370 
tools/python/xen/xend/xenstore/xstransact.py
--- a/tools/python/xen/xend/xenstore/xstransact.py      Tue Oct 18 17:01:14 2005
+++ b/tools/python/xen/xend/xenstore/xstransact.py      Tue Oct 18 17:07:11 2005
@@ -14,6 +14,9 @@
 class xstransact:
 
     def __init__(self, path):
+        self.in_transaction = False # Set this temporarily -- if this
+                                    # constructor fails, then we need to
+                                    # protect __del__.
         self.path = path.rstrip("/")
         self.transaction = xshandle().transaction_start()
         self.in_transaction = True

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Protect __del__ from failure inside __init__ by setting inTransaction before, Xen patchbot -unstable <=