Fixes issue with idf.py passing through Python interpreter, as reported in https://github.com/espressif/esp-idf/issues/1924