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

[minion-cvs] Make pychecker a little happier



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

Modified Files:
	ClientDirectory.py ClientMain.py ClientUtils.py Main.py 
	Packet.py 
Log Message:
Make pychecker a little happier

Index: ClientDirectory.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientDirectory.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- ClientDirectory.py	24 Nov 2003 19:59:03 -0000	1.18
+++ ClientDirectory.py	26 Nov 2003 18:21:48 -0000	1.19
@@ -425,7 +425,7 @@
                         else:
                             d['status'] = "(not recommended)"
                     else:
-                        assert 0
+                        assert 0 # Unreached.
                 else:
                     d[feature] = str(sd.getFeature(sec,ent))
 

Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- ClientMain.py	24 Nov 2003 19:59:04 -0000	1.132
+++ ClientMain.py	26 Nov 2003 18:21:49 -0000	1.133
@@ -126,6 +126,8 @@
             # new keys, so this check is always necessary.
             if self.keyring.isDirty():
                 self.keyring.save()
+
+        assert 0 # Unreached.
         
     def getSURBKeys(self, password=None):
         """Return the keys for _all_ SURB identities as a list of
@@ -1304,7 +1306,6 @@
         features.append(("caps",))
         features.append(("status",))
         for f in features:
-            fCanon = f[0]
             if len(f)>1:
                 print "%-30s (abbreviate as %s)" % (
                     f[0], englishSequence(f[1:],compound="or"))

Index: ClientUtils.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientUtils.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ClientUtils.py	20 Nov 2003 08:51:28 -0000	1.10
+++ ClientUtils.py	26 Nov 2003 18:21:49 -0000	1.11
@@ -251,7 +251,7 @@
         self.initFn = initFn
         self.obsoleteMagic = [] 
         
-    def load(self, create=0,password=None):
+    def load(self, create=0,password=None,now=None):
         """Try to load the encrypted file from disk.  If 'password' is
            not provided, query it from the password manager.  If the file
            does not exist, and 'create' is true, get a new password and
@@ -260,9 +260,9 @@
             # No need to re-load an already-loaded object.
             return 
         elif os.path.exists(self.fname):
-            # Okay, the file is there. Snarf it from disk and try to give a
-            # good warning for its magic string.
-            contents = readFile(self.fname)
+##             # Okay, the file is there. Snarf it from disk and try to give a
+##             # good warning for its magic string.
+##             contents = readFile(self.fname)
 ##             if contents[:8] in self.obsoleteMagic:
 ##                 raise MixError("Found an obsolete keyring at %r.  Remove this file to use SURBs with this version of Mixminion."%self.fname)
 ##             if len(contents)<8 or contents[:8] not in self.okMagic:

Index: Main.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Main.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- Main.py	24 Nov 2003 19:59:04 -0000	1.62
+++ Main.py	26 Nov 2003 18:21:49 -0000	1.63
@@ -271,8 +271,8 @@
     # Read the 'common' module to get the UIError class.  To simplify
     # command implementation code, we catch all UIError exceptions here.
     commonModule = __import__('mixminion.Common', {}, {}, ['UIError'])
-    uiErrorClass = getattr(commonModule, 'UIError')
-    filePermissionErrorClass = getattr(commonModule, 'MixFilePermissionError')
+    uiErrorClass = commonModule.UIError
+    filePermissionErrorClass = commonModule.MixFilePermissionError
 
     # Read the module and function.
     command_module, command_fn = _COMMANDS[args[1]]

Index: Packet.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Packet.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- Packet.py	24 Nov 2003 19:59:04 -0000	1.66
+++ Packet.py	26 Nov 2003 18:21:49 -0000	1.67
@@ -994,7 +994,7 @@
        would make senders partitionable by payload compression.)
     """
     global _ZLIB_LIBRARY_OK
-    ver = getattr(zlib, "ZLIB_VERSION")
+    ver = getattr(zlib, "ZLIB_VERSION", None)
     if ver and ver < "1.1.2":
         raise MixFatalError("Zlib version %s is not supported"%ver)