Use 'byte' regexp pattern to match on 'byte' string

This is done in order to be compatible with Python3
This commit is contained in:
marmeladema 2019-10-20 20:17:08 +01:00
parent af7e4d633a
commit 45817ac26e

View file

@ -359,7 +359,7 @@ class CommandBase(object):
print()
return 1
raise
version = tuple(map(int, re.match("rustup (\d+)\.(\d+)\.(\d+)", version_line).groups()))
version = tuple(map(int, re.match(b"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'.")