Refactor to run in both Python 2.7 and Python 3.6
Refactor to run in both Python 2.7 and Python 3.6. This is important as python 2.7 is end of life. I tried to edit as few things as possible in this commit to minimize conflicts which means the code could be prettier. Signed-off-by: Viktor Sjölind <viktor@sjolind.se>
This commit is contained in:
parent
2125b2d739
commit
96e6da2752
5 changed files with 80 additions and 74 deletions
|
@ -69,7 +69,7 @@ class PullRequest:
|
|||
for repo in self.repos:
|
||||
r = requests.get(repo["uri"])
|
||||
if r.status_code != 200:
|
||||
print "Error fetching %s", repo["name"]
|
||||
print("Error fetching %s", repo["name"])
|
||||
break
|
||||
|
||||
prs = r.json()
|
||||
|
@ -83,4 +83,4 @@ class PullRequest:
|
|||
if __name__ == "__main__":
|
||||
p = PullRequest()
|
||||
for line in p.check_all():
|
||||
print line["message"]
|
||||
print(line["message"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue