From 5d1be3bb8bd6832fb4126f0ad73ed35b1782358a Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Wed, 27 Nov 2019 20:30:49 +0800 Subject: [PATCH] CI: raise import error instead of exit for ble tools --- tools/ble/lib_ble_client.py | 2 +- tools/ble/lib_gap.py | 2 +- tools/ble/lib_gatt.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ble/lib_ble_client.py b/tools/ble/lib_ble_client.py index 6fda14288c..a17cf0a3fc 100644 --- a/tools/ble/lib_ble_client.py +++ b/tools/ble/lib_ble_client.py @@ -29,7 +29,7 @@ try: from gi.repository import GLib except ImportError as e: if 'linux' not in sys.platform: - sys.exit("Error: Only supported on Linux platform") + raise e print(e) print("Install packages `libgirepository1.0-dev gir1.2-gtk-3.0 libcairo2-dev libdbus-1-dev libdbus-glib-1-dev` for resolving the issue") print("Run `pip install -r $IDF_PATH/tools/ble/requirements.txt` for resolving the issue") diff --git a/tools/ble/lib_gap.py b/tools/ble/lib_gap.py index 2033dc4ab8..02466c7aa1 100644 --- a/tools/ble/lib_gap.py +++ b/tools/ble/lib_gap.py @@ -25,7 +25,7 @@ try: import dbus.service except ImportError as e: if 'linux' not in sys.platform: - sys.exit("Error: Only supported on Linux platform") + raise e print(e) print("Install packages `libgirepository1.0-dev gir1.2-gtk-3.0 libcairo2-dev libdbus-1-dev libdbus-glib-1-dev` for resolving the issue") print("Run `pip install -r $IDF_PATH/tools/ble/requirements.txt` for resolving the issue") diff --git a/tools/ble/lib_gatt.py b/tools/ble/lib_gatt.py index c666d8e7e8..4710e1549c 100644 --- a/tools/ble/lib_gatt.py +++ b/tools/ble/lib_gatt.py @@ -25,7 +25,7 @@ try: import dbus.service except ImportError as e: if 'linux' not in sys.platform: - sys.exit("Error: Only supported on Linux platform") + raise e print(e) print("Install packages `libgirepository1.0-dev gir1.2-gtk-3.0 libcairo2-dev libdbus-1-dev libdbus-glib-1-dev` for resolving the issue") print("Run `pip install -r $IDF_PATH/tools/ble/requirements.txt` for resolving the issue")