mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
tools: fix diagnostic output in check_python_dependencies.py
If IDF_PYTHON_ENV_PATH was not set, an exception occurred: Traceback (most recent call last): File "/home/user/esp/esp-idf/tools/check_python_dependencies.py", line 108, in <module> if idf_python_env_path not in sys.executable: TypeError: 'in <string>' requires string as left operand, not NoneType and the final line in the diagnostic message was not printed. Fix to print the PATH if IDF_PYTHON_ENV_PATH is not set.
This commit is contained in:
parent
011379dbb5
commit
1727306645
@ -105,7 +105,7 @@ if __name__ == "__main__":
|
|||||||
idf_python_env_path = os.environ.get('IDF_PYTHON_ENV_PATH')
|
idf_python_env_path = os.environ.get('IDF_PYTHON_ENV_PATH')
|
||||||
print(' IDF_PYTHON_ENV_PATH: {}'.format(idf_python_env_path or '(not set)'))
|
print(' IDF_PYTHON_ENV_PATH: {}'.format(idf_python_env_path or '(not set)'))
|
||||||
print(' Python interpreter used: {}'.format(sys.executable))
|
print(' Python interpreter used: {}'.format(sys.executable))
|
||||||
if idf_python_env_path not in sys.executable:
|
if not idf_python_env_path or idf_python_env_path not in sys.executable:
|
||||||
print(' Warning: python interpreter not running from IDF_PYTHON_ENV_PATH')
|
print(' Warning: python interpreter not running from IDF_PYTHON_ENV_PATH')
|
||||||
print(' PATH: {}'.format(os.getenv('PATH')))
|
print(' PATH: {}'.format(os.getenv('PATH')))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user