[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] More paranoia on server lists
Update of /home/minion/cvsroot/src/minion/lib/mixminion/directory
In directory moria.mit.edu:/tmp/cvs-serv17243/lib/mixminion/directory
Modified Files:
ServerList.py
Log Message:
More paranoia on server lists
Index: ServerList.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/directory/ServerList.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ServerList.py 30 May 2003 02:11:11 -0000 1.24
+++ ServerList.py 30 May 2003 02:18:12 -0000 1.25
@@ -114,7 +114,6 @@
createPrivateDir(self.archiveDir)
createPrivateDir(self.dirArchiveDir)
self.rescan()
-
def isServerKnown(self, server):
"""Return true iff the current server descriptor is known. Raises
@@ -391,7 +390,14 @@
filename)
continue
nickname, key = t[1]
- self.serverIDs[nickname.lower()] = pk_decode_public_key(key)
+ key = pk_decode_public_key(key)
+ if self.serverIDs.has_key(nickname.lower()):
+ LOG.warn("Eeek! Multiple entries for %s", nickname)
+ if not pk_same_public_key(self.serverIDs[nickname.lower()],
+ key):
+ raise MixFatalError(
+ "Multiple conflicting entries for %s"%nickname)
+ self.serverIDs[nickname.lower()] = key
# (check for consistency)
for s in self.servers.values():