[gnome-keysign: 13/17] tests: Avoid too broad exception clause
- From: Tobias Mueller <tobiasmue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keysign: 13/17] tests: Avoid too broad exception clause
- Date: Fri, 15 Dec 2017 16:27:01 +0000 (UTC)
commit c8e3466b7ea211ecdb486cbd56159f5bf873cdc5
Author: RyuzakiKK <aasonykk gmail com>
Date: Sat Dec 2 22:15:40 2017 +0100
tests: Avoid too broad exception clause
tests/test_bluetooth.py | 2 +-
tests/test_gpgmks.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test_bluetooth.py b/tests/test_bluetooth.py
index 0ebf936..593b905 100644
--- a/tests/test_bluetooth.py
+++ b/tests/test_bluetooth.py
@@ -15,7 +15,7 @@ try:
from keysign.bluetoothoffer import BluetoothOffer
from keysign.bluetoothreceive import BluetoothReceive
HAVE_BT = True
-except:
+except ImportError:
HAVE_BT = False
from keysign.gpgmh import get_public_key_data, openpgpkey_from_data
from keysign.util import mac_generate
diff --git a/tests/test_gpgmks.py b/tests/test_gpgmks.py
index eeba11b..ac36272 100644
--- a/tests/test_gpgmks.py
+++ b/tests/test_gpgmks.py
@@ -36,7 +36,7 @@ try:
from keysign.gpgmks import get_usable_secret_keys
from keysign.gpgmks import sign_keydata_and_encrypt
HAVE_MKS = True
-except:
+except ImportError:
HAVE_MKS = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]