summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-11-11 15:49:05 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-11-11 15:49:05 +0000
commita665fb536a46d9f9b9e775d3797d8c5c79939982 (patch)
treea74bc939da3d8a98924bc6729b53547fbd8e8d09
parent0db560e2a7d05ab084064798a1b8807bd17138b6 (diff)
downloadbcfg2-a665fb536a46d9f9b9e775d3797d8c5c79939982.tar.gz
bcfg2-a665fb536a46d9f9b9e775d3797d8c5c79939982.tar.bz2
bcfg2-a665fb536a46d9f9b9e775d3797d8c5c79939982.zip
fix XMLFileBacked
2004/11/10 15:00:06-06:00 anl.gov!desai fix ScopedXMLFiles problem caused by pylint fixups 2004/11/10 13:35:37-06:00 anl.gov!desai add fam into the mix (Logical change 1.151) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@676 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Generator.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Server/Generator.py b/src/lib/Server/Generator.py
index 88a0b02d7..0089df111 100644
--- a/src/lib/Server/Generator.py
+++ b/src/lib/Server/Generator.py
@@ -132,10 +132,10 @@ class XMLFileBacked(FileBacked):
'''This object is a coherent cache for an XML file to be used as a part of DirectoryBacked.'''
__identifier__ = 'name'
- def __init__(self, filename, fam):
- FileBacked.__init__(self, filename, fam)
+ def __init__(self, filename):
self.label = "dummy"
self.entries = []
+ FileBacked.__init__(self, filename)
def Index(self):
'''Build local data structures'''
@@ -161,9 +161,9 @@ class ScopedXMLFile(SingleXMLFileBacked):
__containers__ = ['Class', 'Host', 'Image']
def __init__(self, filename, fam):
- SingleXMLFileBacked.__init__(self, filename, fam)
self.store = {}
self.__provides__ = {}
+ SingleXMLFileBacked.__init__(self, filename, fam)
def StoreRecord(self, metadata, entry):
'''Store scoped record based on metadata'''
@@ -189,7 +189,8 @@ class ScopedXMLFile(SingleXMLFileBacked):
name = (entry.tag, entry.get('name'))
[self.StoreRecord(name, child) for child in entry.getchildren()]
# now to build the __provides__ table
- self.__provides__ = {}
+ for key in self.__provides__.keys():
+ del self.__provides__[key]
for key in self.store.keys():
self.__provides__[key] = {}
for name in self.store[key].keys():