From 9618dd54fe89bf08676b749dda25b49ab3de586f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 27 Sep 2012 01:07:56 -0400 Subject: [PATCH] Partial pylint cleanup. --- Makefile | 3 ++- git-irkbot.py | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d255e1e..5983153 100644 --- a/Makefile +++ b/Makefile @@ -22,9 +22,10 @@ clean: rm -f irker irker.1 irker-*.rpm irker-*.tar.gz *~ rm -f SHIPPER.* *.html -PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,E1101" +PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,E1101,W0621" pylint: @pylint --output-format=parseable $(PYLINTOPTS) irker + @pylint --output-format=parseable $(PYLINTOPTS) git-irkbot.py SOURCES = README COPYING NEWS irker Makefile irker.xml irker-logo.png diff --git a/git-irkbot.py b/git-irkbot.py index 8193fc8..d44c014 100755 --- a/git-irkbot.py +++ b/git-irkbot.py @@ -53,8 +53,8 @@ default_irker_port = 6659 # through gitweb or something similar. The defaults will probably # work if you have a typical gitweb/cgit setup. # -#urlprefix="http://%(host)s/cgi-bin/gitweb.cgi?p=%(repo)s;a=commit;h=" -urlprefix="http://%(host)s/cgi-bin/cgit.cgi/%(repo)s/commit/?id=" +#urlprefix = "http://%(host)s/cgi-bin/gitweb.cgi?p=%(repo)s;a=commit;h=" +urlprefix = "http://%(host)s/cgi-bin/cgit.cgi/%(repo)s/commit/?id=" # The service used to turn your gitwebbish URL into a tinyurl so it # will take up less space on the IRC notification line. @@ -102,7 +102,7 @@ def extract(refname, merged): rev = merged[:12] # Extract the meta-information for the commit - files=do("git diff-tree -r --name-only '"+ merged +"' | sed -e '1d' -e 's-.*-&-'") + files = do("git diff-tree -r --name-only '"+ merged +"' | sed -e '1d' -e 's-.*-&-'") metainfo = do("git log -1 '--pretty=format:%an <%ae>%n%at%n%s' " + merged) (author, ts, logmsg) = metainfo.split("\n") @@ -179,8 +179,7 @@ if __name__ == "__main__": merges = arguments[1:] for merged in merges: - context = extract(refname, merged) - privmsg = template % context + privmsg = template % extract(refname, merged) channel_list = channels.split(",") structure = {"to":channel_list, "privmsg":privmsg} message = json.dumps(structure) -- 2.26.2