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

[minion-cvs] Fix pychecker errors



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

Modified Files:
	Common.py benchmark.py testSupport.py 
Log Message:
Fix pychecker errors

Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- Common.py	5 Jun 2003 05:24:23 -0000	1.86
+++ Common.py	5 Jun 2003 05:34:56 -0000	1.87
@@ -1248,6 +1248,8 @@
         idx += 1
         fname = os.path.join(base, "%s.%s"%(rest,idx))
 
+    raise MixFatalError("unreachable code")
+
 #----------------------------------------------------------------------
 class Lockfile:
     """Class to implement a recursive advisory lock, using flock on a

Index: benchmark.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/benchmark.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- benchmark.py	5 Jun 2003 02:27:30 -0000	1.38
+++ benchmark.py	5 Jun 2003 05:34:56 -0000	1.39
@@ -13,6 +13,7 @@
 __pychecker__ = 'no-funcdoc no-reimport'
 __all__ = [ 'timeAll', 'testLeaks1', 'testLeaks2' ]
 
+import gc
 import os
 import stat
 import cPickle
@@ -850,8 +851,6 @@
         print n, "sent"
 
 
-import gc
-import pprint
 
 def testLeaks5_send2():
     from mixminion.test import _getMMTPServer

Index: testSupport.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/testSupport.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- testSupport.py	30 May 2003 03:07:56 -0000	1.16
+++ testSupport.py	5 Jun 2003 05:34:56 -0000	1.17
@@ -124,8 +124,8 @@
 
 # Name of our temporary directory: all temporary files go under this
 # directory.  If None, it hasn't been created yet.  If it exists,
-# it must be owned by us, mode 700, and have no parents that an adversary
-# (other than root) could write to.
+# it must be owned by us, mode 700.
+
 _MM_TESTING_TEMPDIR = None
 # How many temporary files have we created so far?
 _MM_TESTING_TEMPDIR_COUNTER = 0
@@ -175,7 +175,6 @@
         if st[stat.ST_UID] != os.getuid():
             print "The wrong user owns temp dir %r"%temp
             sys.exit(1)
-        parent = temp
 
         _MM_TESTING_TEMPDIR = temp
         if _MM_TESTING_TEMPDIR_REMOVE_ON_EXIT: