summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-repo-validate
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-04-23 02:35:59 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-04-23 02:35:59 +0000
commit92d2aa13373111c83f4077009a0b33b61a5bb015 (patch)
treebab80e5b4f8a4d8fc0214206806b68b0c7472279 /src/sbin/bcfg2-repo-validate
parentbfff630862e73faf07b79c9b4a504086f663485b (diff)
downloadbcfg2-92d2aa13373111c83f4077009a0b33b61a5bb015.tar.gz
bcfg2-92d2aa13373111c83f4077009a0b33b61a5bb015.tar.bz2
bcfg2-92d2aa13373111c83f4077009a0b33b61a5bb015.zip
Remove hacks for sets in python 2.3
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5169 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-repo-validate')
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate
index e04cf6c3c..4c692e362 100755
--- a/src/sbin/bcfg2-repo-validate
+++ b/src/sbin/bcfg2-repo-validate
@@ -6,21 +6,12 @@ repos against their respective XML schemas
'''
__revision__ = '$Revision$'
-import glob, lxml.etree, os, sys
-
+import glob
+import lxml.etree
+import os
+import sys
import Bcfg2.Options
-try:
- pdlist = set
-except NameError:
- class pdlist(list):
- def add(self, item):
- if item not in self:
- self.append(item)
- def discard(self, item):
- if item in self:
- self.remove(item)
-
if __name__ == '__main__':
opts = {'repo': Bcfg2.Options.SERVER_REPOSITORY,
'prefix': Bcfg2.Options.INSTALL_PREFIX,
@@ -46,10 +37,10 @@ if __name__ == '__main__':
# get metadata list (with all included files)
metadata_list = glob.glob("%s/Metadata/groups.xml" % repo)
- ref_bundles = pdlist()
+ ref_bundles = set()
xdata = lxml.etree.parse("%s/Metadata/groups.xml" % repo)
- included = pdlist([ent.get('href') for ent in \
- xdata.findall('./{http://www.w3.org/2001/XInclude}include')])
+ included = set([ent.get('href') for ent in \
+ xdata.findall('./{http://www.w3.org/2001/XInclude}include')])
while included:
try:
filename = included.pop()