]> thyrsus.com Git - rcs-fast-import.git/commitdiff
pychecker cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 25 Nov 2010 04:06:40 +0000 (23:06 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 25 Nov 2010 04:06:40 +0000 (23:06 -0500)
Makefile
rcs-fast-import

index f353d48d19cd068e8df3bb943d4ce51f58ec6aa7..01a16e6f54ba21351e2a9caeabd297bd60fb2776 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,9 +24,10 @@ rcs-fast-import-$(VERS).tar.gz: $(SOURCES) rcs-fast-import.1
        @(cd ..; rm rcs-fast-import-$(VERS))
 
 pychecker:
-       ln -f rcs-fast-import rcs-fast-import.py
-       pychecker --only --limit 50 rcs-fast-import.py
-       rm -f rcs-fast-import.py
+       @echo "Expect four messages about unknown methods checkin and maketag."
+       @ln -f rcs-fast-import rcs-fast-import.py
+       @-pychecker --quiet --only --limit 50 rcs-fast-import.py
+       @rm -f rcs-fast-import.py rcs-fast-import.pyc
 
 version:
        @echo $(VERS)
index 3e42b53cda295e78b43054e57ce662f0441279d2..369625f3c845bd212a45744b5669b35321dd4fcf 100755 (executable)
@@ -73,10 +73,10 @@ class Baton:
             self.stream.flush()
         self.count = self.count + 1
         return
-    def __exit__(self, type, value, traceback):
-        if type == KeyboardInterrupt:
+    def __exit__(self, extype, value_unused, traceback_unused):
+        if extype == KeyboardInterrupt:
             self.endmsg = "interrupted"
-        if type == FatalException:
+        if extype == FatalException:
             self.endmsg = "aborted by error"
         if self.stream:
             self.stream.write("...(%2.2f sec) %s.\n" \
@@ -278,7 +278,7 @@ class Repository:
     # __enter and __exit__ added for rcs-fast-import
     def __enter__(self):        
         return self
-    def __exit__(self, type, value, traceback):
+    def __exit__(self, type_unused, value_unused, traceback_unused):
         self.cleanup()
     def cleanup(self):
         nuke(self.subdir(), "rcs-fast-import: cleaning up %s" % self.subdir())
@@ -530,14 +530,14 @@ class Repository:
     def __setitem__(self, i, v):
         self.events[i] = v
 
-def sanecheck(event, path, mode):
+def sanecheck(event_unused, path, mode):
     "Sanity-check an operation to see if we can cope."
     if mode == "160000":
-        raise FatalException("cannot import submodule link %s", path)
+        raise FatalException("cannot import submodule link %s" % path)
     elif mode == "120000":
-        raise FatalException("cannot import a symlink %s", path)
+        raise FatalException("cannot import a symlink %s"% path)
     if not mode[-3:] in ('644', '755'):
-        raise FatalException("unknown mode %s on %s", (mode, path))
+        raise FatalException("unknown mode %s on %s" % (mode, path))
 
 def complain(msg):
     print >>sys.stderr, "rcs-fast-import:", msg