[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Minor patches



Update of /home/minion/cvsroot/src/minion/lib/mixminion/directory
In directory moria.mit.edu:/tmp/cvs-serv24598/src/minion/lib/mixminion/directory

Modified Files:
	ServerList.py 
Log Message:
Minor patches

Index: ServerList.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/directory/ServerList.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- ServerList.py	23 May 2003 22:49:30 -0000	1.17
+++ ServerList.py	25 May 2003 17:07:31 -0000	1.18
@@ -22,8 +22,8 @@
 
 from mixminion.Crypto import pk_decode_public_key, pk_encode_public_key, \
      pk_same_public_key
-from mixminion.Common import IntervalSet, LOG, MixError, UIError, \
-     createPrivateDir, \
+from mixminion.Common import IntervalSet, LOG, MixError, MixFatalError, \
+     UIError, createPrivateDir, \
      formatBase64, formatDate, formatFnameTime, formatTime, Lockfile, \
      openUnique, \
      previousMidnight, readPickled, readPossiblyGzippedFile, stringContains, \
@@ -451,10 +451,9 @@
         return len(os.listdir(self.incomingDir)) > 0
 
     def readPendingServers(self):
-        d = self.incomingDir
         res = []
-        for fname in os.listdir(d):
-            path = os.path.join(d,fname)
+        for fname in os.listdir(self.incomingDir):
+            path = os.path.join(self.incomingDir,fname)
             try:
                 text, server = _readServer(path)
             except (ConfigError, MixError),e:
@@ -468,7 +467,7 @@
     def delPendingServers(self, fnames):
         for fname in fnames:
             try:
-                os.path.unlink(os.path.join(d, fname))
+                os.path.unlink(os.path.join(self.incomingDir, fname))
             except OSError:
                 LOG.warn("delPendingServers: no such server %s"%fname)
 
@@ -585,7 +584,7 @@
         try:
             serverList._lock()
             serverList.learnServerID(incoming[0][1])
-            self._doAccept(serverList, self.newQueue, incmoing, reject,
+            self._doAccept(serverList, self.newQueue, incoming, reject,
                            knownOnly=1)
         finally:
             serverList._unlock()