mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
run-tests: introduce PYTHON3 boolean constant (issue4668)
This will avoid open-coding lots of version_info checks later in the file.
This commit is contained in:
parent
f4891c885e
commit
b4a58c425e
@ -79,7 +79,10 @@ except ImportError:
|
||||
processlock = threading.Lock()
|
||||
|
||||
if sys.version_info > (3, 0, 0):
|
||||
PYTHON3 = True
|
||||
xrange = range # we use xrange in one place, and we'd rather not use range
|
||||
else:
|
||||
PYTHON3 = False
|
||||
|
||||
def checkportisavailable(port):
|
||||
"""return true if a port seems free to bind on localhost"""
|
||||
|
Loading…
Reference in New Issue
Block a user