##// END OF EJS Templates
Start making backport_pr work on Python 3
Thomas Kluyver -
Show More
@@ -26,7 +26,10 b' import re'
26 26 import sys
27 27
28 28 from subprocess import Popen, PIPE, check_call, check_output
29 from urllib import urlopen
29 try:
30 from urllib.request import urlopen
31 except:
32 from urllib import urlopen
30 33
31 34 from gh_api import (
32 35 get_issues_list,
@@ -45,8 +48,8 b" def find_rejects(root='.'):"
45 48 def get_current_branch():
46 49 branches = check_output(['git', 'branch'])
47 50 for branch in branches.splitlines():
48 if branch.startswith('*'):
49 return branch[1:].strip()
51 if branch.startswith(b'*'):
52 return branch[1:].strip().decode('utf-8')
50 53
51 54 def backport_pr(branch, num, project='ipython/ipython'):
52 55 current_branch = get_current_branch()
General Comments 0
You need to be logged in to leave comments. Login now