provisioning: Enhance warning for Python 2.7.
Color-highlight the warning. Use print instead of warnings.warn (this omits unnecessary debug info).
This commit is contained in:
parent
819d5f6ebe
commit
c264f7ef12
|
@ -4,7 +4,6 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
import warnings
|
|
||||||
|
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
|
|
||||||
|
@ -14,6 +13,11 @@ sys.path.append(ZULIP_BOTS_DIR)
|
||||||
|
|
||||||
import generate_manifest
|
import generate_manifest
|
||||||
|
|
||||||
|
yellow = '\033[93m'
|
||||||
|
green = '\033[92m'
|
||||||
|
end_format = '\033[0m'
|
||||||
|
bold = '\033[1m'
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
usage = """./tools/provision
|
usage = """./tools/provision
|
||||||
|
|
||||||
|
@ -83,13 +87,8 @@ the Python version this command is executed with."""
|
||||||
if py_version > (3, 1):
|
if py_version > (3, 1):
|
||||||
install_dependencies('py3_requirements.txt')
|
install_dependencies('py3_requirements.txt')
|
||||||
else:
|
else:
|
||||||
warnings.warn("Your Python version does not support mypy. `tools/run-mypy` will fail.")
|
print(yellow + "Your Python version does not support mypy. `tools/run-mypy` will fail." + end_format)
|
||||||
|
|
||||||
green = '\033[92m'
|
|
||||||
end_format = '\033[0m'
|
|
||||||
bold = '\033[1m'
|
|
||||||
|
|
||||||
print('\n')
|
|
||||||
print(green + 'Success!' + end_format)
|
print(green + 'Success!' + end_format)
|
||||||
|
|
||||||
activate_command = os.path.join(base_dir,
|
activate_command = os.path.join(base_dir,
|
||||||
|
|
Loading…
Reference in a new issue