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] Explicit test for None.

# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 40e6dfad4eff688ace19c53d2d63ef0d5656f4b7
# Parent  1585590ec4746fe8b09d3c8856e1dd2fb303dada
Explicit test for None.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 1585590ec474 -r 40e6dfad4eff 
tools/python/xen/xend/xenstore/xstransact.py
--- a/tools/python/xen/xend/xenstore/xstransact.py      Wed Sep 14 19:34:13 2005
+++ b/tools/python/xen/xend/xenstore/xstransact.py      Wed Sep 14 19:52:04 2005
@@ -138,10 +138,10 @@
                     raise TypeError
             else:
                 (key, val, fmt) = tup
-            if val:
+            if val is None:
+                self._remove(key)
+            else:
                 self._write(key, fmt % val)
-            else:
-                self._remove(key)
 
 
     def Read(cls, path, *args):

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Explicit test for None., Xen patchbot -unstable <=