aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/mgagit/templates/git-post-receive-hook
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-01-04 14:07:02 +0000
committerColin Guthrie <colin@mageia.org>2014-01-04 14:07:02 +0000
commit9c69307af05b4e50e15f2b8dfc12ce9129e79394 (patch)
treec4a788170a0970fe5ccc9ee05b86ab248c57b76a /deployment/mgagit/templates/git-post-receive-hook
parent96129c759a0f5c7f50dbc1af8467e20e311efde6 (diff)
downloadpuppet-9c69307af05b4e50e15f2b8dfc12ce9129e79394.tar
puppet-9c69307af05b4e50e15f2b8dfc12ce9129e79394.tar.gz
puppet-9c69307af05b4e50e15f2b8dfc12ce9129e79394.tar.bz2
puppet-9c69307af05b4e50e15f2b8dfc12ce9129e79394.tar.xz
puppet-9c69307af05b4e50e15f2b8dfc12ce9129e79394.zip
mgagit: Some trivial pylint tidyups
Diffstat (limited to 'deployment/mgagit/templates/git-post-receive-hook')
-rwxr-xr-xdeployment/mgagit/templates/git-post-receive-hook20
1 files changed, 10 insertions, 10 deletions
diff --git a/deployment/mgagit/templates/git-post-receive-hook b/deployment/mgagit/templates/git-post-receive-hook
index d5bff729..e5c60f39 100755
--- a/deployment/mgagit/templates/git-post-receive-hook
+++ b/deployment/mgagit/templates/git-post-receive-hook
@@ -10,7 +10,7 @@ sys.path.insert(0, LIBDIR)
import git_multimail
import xmlrpclib
-from cookielib import CookieJar, LWPCookieJar
+from cookielib import LWPCookieJar
from bugz.bugzilla import BugzillaProxy
# When editing this list, remember to edit the same list in
@@ -82,7 +82,7 @@ class LinksRevision(git_multimail.Revision):
self.bz.User.login(params)
self.cookiejar.save()
os.chmod(self.cookiejar.filename, 0600)
-
+
def bugzilla_call(self, method, *args):
"""Attempt to call method with args. Log in if authentication is required.
"""
@@ -106,24 +106,24 @@ class LinksRevision(git_multimail.Revision):
commit = None
idx = 0
for line in output:
- idx+=1
+ idx += 1
if line == "---\n":
if commit and COMMIT_REPLACE:
output.insert(idx, "\n")
output.insert(idx, " %s\n" % (COMMIT_REPLACE % (self.environment.get_repo_shortname(), commit)))
output.insert(idx, " Commit Link:\n")
- idx+=3
+ idx += 3
if bugs:
output.insert(idx, " Bug links:\n")
- idx+=1
- for tracker,bugnos in bugs.items():
+ idx += 1
+ for tracker, bugnos in bugs.items():
output.insert(idx, " %s\n" % tracker)
- idx+=1
+ idx += 1
for bugno in bugnos:
output.insert(idx, " %s\n" % (BUG_REFS[tracker]['replace'] % bugno))
- idx+=1
+ idx += 1
output.insert(idx, "\n")
- idx+=1
+ idx += 1
# Attempt to modify bugzilla
if "Mageia" in bugs:
@@ -153,7 +153,7 @@ class LinksRevision(git_multimail.Revision):
break
m = COMMIT_RE.search(line)
if m:
- commit = m.group(1);
+ commit = m.group(1)
for tracker in BUG_REFS.keys():
foundbugs = BUG_REFS[tracker]['re'].findall(line)
if len(foundbugs):