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

[Xen-changelog] [xen-unstable] Move the assert under the protection of the in_transaction flag.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 1b501311c7785bbfae3cf44c54e40ee58d6538b1
# Parent  07e3f39eaf10f098058497e72f7cd828fa44562b
Move the assert under the protection of the in_transaction flag.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/xenstore/xstransact.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 07e3f39eaf10 -r 1b501311c778 
tools/python/xen/xend/xenstore/xstransact.py
--- a/tools/python/xen/xend/xenstore/xstransact.py      Wed Nov 29 12:14:45 
2006 +0000
+++ b/tools/python/xen/xend/xenstore/xstransact.py      Wed Nov 29 12:15:45 
2006 +0000
@@ -11,11 +11,12 @@ class xstransact:
 class xstransact:
 
     def __init__(self, path = ""):
-        assert path is not None
         
         self.in_transaction = False # Set this temporarily -- if this
                                     # constructor fails, then we need to
                                     # protect __del__.
+
+        assert path is not None
         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


 


Rackspace

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