mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
tests/wpt/update: Fix print statements to be compatible with Python3
This commit is contained in:
parent
45817ac26e
commit
179caed30f
2 changed files with 9 additions and 5 deletions
|
@ -2,6 +2,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import json
|
||||
from urlparse import urljoin
|
||||
requests = None
|
||||
|
@ -46,7 +48,7 @@ class GitHub(object):
|
|||
if 200 <= resp.status_code < 300:
|
||||
return resp.json()
|
||||
else:
|
||||
print resp.status_code, resp.json()
|
||||
print(resp.status_code, resp.json())
|
||||
raise GitHubError(resp.status_code, resp.json())
|
||||
|
||||
def repo(self, owner, name):
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
@ -155,7 +157,7 @@ class SelectCommits(Step):
|
|||
while True:
|
||||
commits = state.source_commits[:]
|
||||
for i, commit in enumerate(commits):
|
||||
print "%i:\t%s" % (i, commit.message.summary)
|
||||
print("%i:\t%s" % (i, commit.message.summary))
|
||||
|
||||
remove = raw_input("Provide a space-separated list of any commits numbers to remove from the list to upstream:\n").strip()
|
||||
remove_idx = set()
|
||||
|
@ -178,9 +180,9 @@ class SelectCommits(Step):
|
|||
|
||||
keep_commits = [(i,cmt) for i,cmt in enumerate(commits) if i not in remove_idx]
|
||||
#TODO: consider printed removed commits
|
||||
print "Selected the following commits to keep:"
|
||||
print("Selected the following commits to keep:")
|
||||
for i, commit in keep_commits:
|
||||
print "%i:\t%s" % (i, commit.message.summary)
|
||||
print("%i:\t%s" % (i, commit.message.summary))
|
||||
confirm = raw_input("Keep the above commits? y/n\n").strip().lower()
|
||||
|
||||
if confirm == "y":
|
||||
|
@ -210,7 +212,7 @@ class MovePatches(Step):
|
|||
try:
|
||||
state.sync_tree.import_patch(stripped_patch, 1 + strip_count)
|
||||
except:
|
||||
print patch.diff
|
||||
print(patch.diff)
|
||||
raise
|
||||
state.commits_loaded = i
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue