From eee5e93bae66a64550022d3366ad5105e04c3090 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 21 Nov 2010 14:38:53 -0500 Subject: [PATCH] Add a pychecker check and fix what it revealed. --- Makefile | 8 +++++++- freshmeat-submit | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b352399..5f7f0a6 100644 --- 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 diff --git a/freshmeat-submit b/freshmeat-submit index 10fccc8..bf7440b 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -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 -- 2.43.0