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