ia64/xen-unstable

changeset 6819:3eea03342466

Don't fail readDB on empty dirs.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Sep 13 21:00:13 2005 +0000 (2005-09-13)
parents a0399927e1a1
children 36c4d3bb29c8
files tools/python/xen/xend/xenstore/xsobj.py
line diff
     1.1 --- a/tools/python/xen/xend/xenstore/xsobj.py	Tue Sep 13 20:54:41 2005 +0000
     1.2 +++ b/tools/python/xen/xend/xenstore/xsobj.py	Tue Sep 13 21:00:13 2005 +0000
     1.3 @@ -485,9 +485,11 @@ class DBMap(dict):
     1.4          if self.__db__ is None:
     1.5              return
     1.6          self.__data__ = self.__db__.getData()
     1.7 -        for k in self.__db__.ls():
     1.8 -            n = self.addChild(k)
     1.9 -            n.readDB()
    1.10 +        l = self.__db__.ls()
    1.11 +        if l:
    1.12 +            for k in l:
    1.13 +                n = self.addChild(k)
    1.14 +                n.readDB()
    1.15          self.__dirty__ = False
    1.16  
    1.17      def readChildDB(self, k):