]> thyrsus.com Git - freecode-submit.git/commitdiff
Add a pychecker check and fix what it revealed.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 21 Nov 2010 19:38:53 +0000 (14:38 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 21 Nov 2010 19:38:53 +0000 (14:38 -0500)
Makefile
freshmeat-submit

index b35239959ba2502b30039414338437d125d587f0..5f7f0a67d7bd7baf7f71a6cb42ac18b86e859e36 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,14 @@ freshmeat-submit-$(VERS).tar.gz: $(SOURCES) freshmeat-submit.1
        (cd ..; tar -czf freshmeat-submit/freshmeat-submit-$(VERS).tar.gz `cat freshmeat-submit/MANIFEST`)
        (cd ..; rm freshmeat-submit-$(VERS))
 
+pychecker:
+       @echo "Expect: Object (data) has no attribute (update)"
+       @ln -f freshmeat-submit freshmeat-submit.py
+       @-pychecker --only --limit 50 freshmeat-submit.py
+       @rm -f freshmeat-submit.py
+
 clean:
-       rm -f *.html freshmeat-submit.1 MANIFEST ChangeLog SHIPPER.* *~
+       rm -f *.pyc *.html freshmeat-submit.1 MANIFEST ChangeLog SHIPPER.* *~
 
 dist: freshmeat-submit-$(VERS).tar.gz
 
index 10fccc8fea550a4b315124cb472e1cf8d6f649f8..bf7440b75249588f3790540081c885bcf96b4457 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # freshmeat-submit -- script transactions with the Freshmeat server
 
-import sys, re, urllib2, json, netrc, email.Parser, optparse, commands
+import sys, re, urllib2, json, netrc, email.Parser, optparse
 
 class Update:
     "Encapsulate dictionaries describing a project metadata update."
@@ -38,7 +38,7 @@ class RequestWithMethod(urllib2.Request):
         else:
             return "GET"
 
-class FreshmeatSessionException:
+class FreshmeatSessionException(Exception):
     def __init__(self, msg):
         self.msg = msg