direct-io.hg

changeset 6824:40e6dfad4eff

Explicit test for None.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed Sep 14 19:52:04 2005 +0000 (2005-09-14)
parents 1585590ec474
children 05d42f7674e8
files tools/python/xen/xend/xenstore/xstransact.py
line diff
     1.1 --- a/tools/python/xen/xend/xenstore/xstransact.py	Wed Sep 14 19:34:13 2005 +0000
     1.2 +++ b/tools/python/xen/xend/xenstore/xstransact.py	Wed Sep 14 19:52:04 2005 +0000
     1.3 @@ -138,10 +138,10 @@ class xstransact:
     1.4                      raise TypeError
     1.5              else:
     1.6                  (key, val, fmt) = tup
     1.7 -            if val:
     1.8 +            if val is None:
     1.9 +                self._remove(key)
    1.10 +            else:
    1.11                  self._write(key, fmt % val)
    1.12 -            else:
    1.13 -                self._remove(key)
    1.14  
    1.15  
    1.16      def Read(cls, path, *args):