mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
change(tools): Unified outputs of various standalone scripts (esp-pylib)
This commit is contained in:
+7
-3
@@ -1,18 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2017-2026 Espressif Systems (Shanghai) CO LTD
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from esp_pylib.excepthook import install_exception_reporting
|
||||
from esp_pylib.logger import log
|
||||
|
||||
if __name__ == '__main__':
|
||||
install_exception_reporting()
|
||||
try:
|
||||
import esp_idf_size # noqa: F401
|
||||
|
||||
except ImportError:
|
||||
print('WARNING: esp-idf-size not installed, please run the install script to install it', file=sys.stderr)
|
||||
raise SystemExit(1)
|
||||
log.warn('esp-idf-size not installed, please run the install script to install it')
|
||||
sys.exit(1)
|
||||
|
||||
sys.exit(subprocess.run([sys.executable, '-m', 'esp_idf_size'] + sys.argv[1:]).returncode)
|
||||
|
||||
Reference in New Issue
Block a user