[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Make directories also accept files of invalid servernames
Update of /home/minion/cvsroot/src/minion/lib/mixminion/directory
In directory moria.mit.edu:/tmp/cvs-serv8610/lib/mixminion/directory
Modified Files:
DirMain.py Directory.py
Log Message:
Make directories also accept files of invalid servernames
Index: DirMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/directory/DirMain.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- DirMain.py 28 May 2003 17:26:53 -0000 1.14
+++ DirMain.py 29 May 2003 05:32:11 -0000 1.15
@@ -114,6 +114,18 @@
config = d.getConfig()
badServers = config['Directory'].get('BadServer', [])
+ badServerFiles = config['Directory'].get('BadServerFile', [])
+ for fn in badServerFiles:
+ if not os.path.exists(fn):
+ print "No such file %r; skipping" %fn
+ continue
+ f = open(fn, 'r')
+ for ln in f.readlines():
+ ln = ln.strip()
+ if ln and ln[0] != '#':
+ badServers.append(ln)
+ f.close()
+
location = config['Publishing']['Location']
print "(Bad servers==%r)"%badServers
Index: Directory.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/directory/Directory.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Directory.py 28 May 2003 08:37:48 -0000 1.8
+++ Directory.py 29 May 2003 05:32:11 -0000 1.9
@@ -123,7 +123,8 @@
"CGIGroup" : ('REQUIRE', None, None),
},
'Directory' : {
- "BadServer" : ("ALLOW*", None, None)
+ "BadServer" : ("ALLOW*", None, None),
+ "BadServerFile" : ("ALLOW*", C._parseFilename, None)
},
'Publishing' : {
"__SECTION__": ('REQUIRE', None, None),