mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Fix tidiness errors for Python3 compatibility across whole repo
This commit is contained in:
parent
9d04f231f4
commit
7b5fabe855
10 changed files with 51 additions and 41 deletions
|
@ -635,7 +635,7 @@ class MachCommands(CommandBase):
|
|||
opts = ["-Ztimings=info"] + opts
|
||||
|
||||
if very_verbose:
|
||||
print (["Calling", "cargo", "build"] + opts)
|
||||
print(["Calling", "cargo", "build"] + opts)
|
||||
for key in env:
|
||||
print((key, env[key]))
|
||||
|
||||
|
|
|
@ -627,7 +627,7 @@ install them, let us know by filing a bug!")
|
|||
def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False, uwp=False, features=None):
|
||||
"""Return an extended environment dictionary."""
|
||||
env = os.environ.copy()
|
||||
if sys.platform == "win32" and type(env['PATH']) == unicode:
|
||||
if sys.platform == "win32" and type(env['PATH']) == six.text_type:
|
||||
# On win32, the virtualenv's activate_this.py script sometimes ends up
|
||||
# turning os.environ['PATH'] into a unicode string. This doesn't work
|
||||
# for passing env vars in to a process, so we force it back to ascii.
|
||||
|
|
|
@ -700,20 +700,20 @@ class MachCommands(CommandBase):
|
|||
width_col4 = max([len(str(x)) for x in result['Difference(%)']])
|
||||
|
||||
for p, q, r, s in zip(['Test'], ['First Run'], ['Second Run'], ['Difference(%)']):
|
||||
print ("\033[1m" + "{}|{}|{}|{}".format(p.ljust(width_col1), q.ljust(width_col2), r.ljust(width_col3),
|
||||
s.ljust(width_col4)) + "\033[0m" + "\n" + "--------------------------------------------------"
|
||||
+ "-------------------------------------------------------------------------")
|
||||
print("\033[1m" + "{}|{}|{}|{}".format(p.ljust(width_col1), q.ljust(width_col2), r.ljust(width_col3),
|
||||
s.ljust(width_col4)) + "\033[0m" + "\n" + "--------------------------------------------------"
|
||||
+ "-------------------------------------------------------------------------")
|
||||
|
||||
for a1, b1, c1, d1 in zip(result['Test'], result['Prev_Time'], result['Cur_Time'], result['Difference(%)']):
|
||||
if d1 > 0:
|
||||
print ("\033[91m" + "{}|{}|{}|{}".format(a1.ljust(width_col1),
|
||||
str(b1).ljust(width_col2), str(c1).ljust(width_col3), str(d1).ljust(width_col4)) + "\033[0m")
|
||||
print("\033[91m" + "{}|{}|{}|{}".format(a1.ljust(width_col1),
|
||||
str(b1).ljust(width_col2), str(c1).ljust(width_col3), str(d1).ljust(width_col4)) + "\033[0m")
|
||||
elif d1 < 0:
|
||||
print ("\033[92m" + "{}|{}|{}|{}".format(a1.ljust(width_col1),
|
||||
str(b1).ljust(width_col2), str(c1).ljust(width_col3), str(d1).ljust(width_col4)) + "\033[0m")
|
||||
print("\033[92m" + "{}|{}|{}|{}".format(a1.ljust(width_col1),
|
||||
str(b1).ljust(width_col2), str(c1).ljust(width_col3), str(d1).ljust(width_col4)) + "\033[0m")
|
||||
else:
|
||||
print ("{}|{}|{}|{}".format(a1.ljust(width_col1), str(b1).ljust(width_col2),
|
||||
str(c1).ljust(width_col3), str(d1).ljust(width_col4)))
|
||||
print("{}|{}|{}|{}".format(a1.ljust(width_col1), str(b1).ljust(width_col2),
|
||||
str(c1).ljust(width_col3), str(d1).ljust(width_col4)))
|
||||
|
||||
def jquery_test_runner(self, cmd, release, dev):
|
||||
self.ensure_bootstrapped()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue