aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/github-merge.py
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-03-29 17:47:06 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-03-29 17:47:12 +0200
commit169f3e8637b5a40b82a06f4b951e7896d70fe220 (patch)
tree67263ad98e2339d2c41c48d11d1ecd0c9772abb8 /contrib/devtools/github-merge.py
parentf0f9732d05d79a0c0a69cd0e5b1a074acad40265 (diff)
Remove assigned but never used local variables
Diffstat (limited to 'contrib/devtools/github-merge.py')
-rwxr-xr-xcontrib/devtools/github-merge.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index 2941d2cb6d..9c666673cf 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -46,7 +46,7 @@ def git_config_get(option, default=None):
'''
try:
return subprocess.check_output([GIT,'config','--get',option]).rstrip().decode('utf-8')
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
return default
def retrieve_pr_info(repo,pull):
@@ -193,23 +193,23 @@ def main():
devnull = open(os.devnull,'w')
try:
subprocess.check_call([GIT,'checkout','-q',branch])
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot check out branch %s." % (branch), file=stderr)
sys.exit(3)
try:
subprocess.check_call([GIT,'fetch','-q',host_repo,'+refs/pull/'+pull+'/*:refs/heads/pull/'+pull+'/*',
'+refs/heads/'+branch+':refs/heads/'+base_branch])
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot find pull request #%s or branch %s on %s." % (pull,branch,host_repo), file=stderr)
sys.exit(3)
try:
subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+head_branch], stdout=devnull, stderr=stdout)
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot find head of pull request #%s on %s." % (pull,host_repo), file=stderr)
sys.exit(3)
try:
subprocess.check_call([GIT,'log','-q','-1','refs/heads/'+merge_branch], stdout=devnull, stderr=stdout)
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot find merge of pull request #%s on %s." % (pull,host_repo), file=stderr)
sys.exit(3)
subprocess.check_call([GIT,'checkout','-q',base_branch])
@@ -230,7 +230,7 @@ def main():
message += '\n\nPull request description:\n\n ' + body.replace('\n', '\n ') + '\n'
try:
subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch])
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot be merged cleanly.",file=stderr)
subprocess.check_call([GIT,'merge','--abort'])
sys.exit(4)
@@ -249,12 +249,12 @@ def main():
try:
first_sha512 = tree_sha512sum()
message += '\n\nTree-SHA512: ' + first_sha512
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Unable to compute tree hash")
sys.exit(4)
try:
subprocess.check_call([GIT,'commit','--amend','-m',message.encode('utf-8')])
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("ERROR: Cannot update message.", file=stderr)
sys.exit(4)
@@ -299,7 +299,7 @@ def main():
try:
subprocess.check_call([GIT,'commit','-q','--gpg-sign','--amend','--no-edit'])
break
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("Error while signing, asking again.",file=stderr)
elif reply == 'x':
print("Not signing off on merge, exiting.",file=stderr)