mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Move the assert under the protection of the in_transaction flag.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
26c7d28635
commit
dcf51b3413
1 file changed
+2
-1
@@ -11,11 +11,12 @@ from xen.xend.xenstore.xsutil import xshandle
|
||||
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
|
||||
|
||||