Make cipd auth-login issue more clear Don't print lots of other output if CIPD auth fails. Fixed: 132 Change-Id: I3a497083068bb74cb63a7ace86ec74440375310e
diff --git a/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py b/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py index c861369..b0f2a16 100644 --- a/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py +++ b/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py
@@ -85,6 +85,14 @@ ): """Creates a venv and installs all packages in this Git repo.""" + version = subprocess.check_output( + (python, '--version'), stderr=subprocess.STDOUT).strip().decode() + if '3.8' not in version: + print('=' * 60, file=sys.stderr) + print('Unexpected Python version:', version, file=sys.stderr) + print('=' * 60, file=sys.stderr) + return + pyvenv_cfg = os.path.join(venv_path, 'pyvenv.cfg') if full_envsetup or not os.path.exists(pyvenv_cfg): print('Creating venv at', venv_path)