diff options
author | marmeladema <xademax@gmail.com> | 2019-10-14 00:15:02 +0100 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-10-16 00:22:06 +0100 |
commit | 4e1ee07a79a1d4f696c259c1774e215e389c8eee (patch) | |
tree | 859b879d1bcf9a4a251d35a189b2a14b1b35e6e0 /python/servo/command_base.py | |
parent | eda6d3e0c5938fe161ed3821a8e984c9e14a6b8e (diff) | |
download | servo-4e1ee07a79a1d4f696c259c1774e215e389c8eee.tar.gz servo-4e1ee07a79a1d4f696c259c1774e215e389c8eee.zip |
Improve print statement compatibility with Python3
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 7f4e941a4c7..67f91e6a1d4 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -7,6 +7,8 @@ # option. This file may not be copied, modified, or distributed # except according to those terms. +from __future__ import print_function + from errno import ENOENT as NO_SUCH_FILE_OR_DIRECTORY from glob import glob import shutil @@ -350,15 +352,15 @@ class CommandBase(object): version_line = subprocess.check_output(["rustup" + BIN_SUFFIX, "--version"]) except OSError as e: if e.errno == NO_SUCH_FILE_OR_DIRECTORY: - print "It looks like rustup is not installed. See instructions at " \ - "https://github.com/servo/servo/#setting-up-your-environment" - print + print("It looks like rustup is not installed. See instructions at " + "https://github.com/servo/servo/#setting-up-your-environment") + print() return 1 raise version = tuple(map(int, re.match("rustup (\d+)\.(\d+)\.(\d+)", version_line).groups())) if version < (1, 11, 0): - print "rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version - print "Try running 'rustup self update'." + print("rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version) + print("Try running 'rustup self update'.") return 1 toolchain = self.toolchain() if platform.system() == "Windows": |