Remove all suppress usages
Change-Id: I3fd16d1726bfb107d0cf53622762bf7d96a32801
diff --git a/acts/tests/google/ble/gatt/GattToolTest.py b/acts/tests/google/ble/gatt/GattToolTest.py
index 084b76a..fda80c2 100644
--- a/acts/tests/google/ble/gatt/GattToolTest.py
+++ b/acts/tests/google/ble/gatt/GattToolTest.py
@@ -26,7 +26,6 @@
import pprint
from queue import Empty
import time
-from contextlib import suppress
from acts.test_utils.bt.BleEnum import ScanSettingsScanMode
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
diff --git a/acts/tests/google/bt/RfcommTest.py b/acts/tests/google/bt/RfcommTest.py
index 26ecad4..47ec598 100644
--- a/acts/tests/google/bt/RfcommTest.py
+++ b/acts/tests/google/bt/RfcommTest.py
@@ -18,7 +18,6 @@
This test was designed to be run in a shield box.
"""
-from contextlib import suppress
import threading
import time
diff --git a/acts/tests/google/bt/system_tests/RfcommLongevityTest.py b/acts/tests/google/bt/system_tests/RfcommLongevityTest.py
index 119b857..0affc85 100644
--- a/acts/tests/google/bt/system_tests/RfcommLongevityTest.py
+++ b/acts/tests/google/bt/system_tests/RfcommLongevityTest.py
@@ -20,7 +20,6 @@
import threading
import time
-from contextlib import suppress
from random import randint
from queue import Empty
@@ -56,9 +55,11 @@
self.log.info("Failed to reset bluetooth state, retrying...")
def teardown_test(self):
- with suppress(Exception):
+ try:
for thread in self.thread_list:
thread.join()
+ except Exception:
+ self.log.error("Failed to join threads.")
for _ in range(5):
if reset_bluetooth(self.android_devices):
break
diff --git a/acts/tests/google/bt/system_tests/RfcommStressTest.py b/acts/tests/google/bt/system_tests/RfcommStressTest.py
index 20d624e..b2899e1 100644
--- a/acts/tests/google/bt/system_tests/RfcommStressTest.py
+++ b/acts/tests/google/bt/system_tests/RfcommStressTest.py
@@ -20,7 +20,6 @@
import threading
import time
-from contextlib import suppress
from queue import Empty
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
diff --git a/acts/tests/google/bt/test_tools/EnergyTest.py b/acts/tests/google/bt/test_tools/EnergyTest.py
index 663cefb..efc2bfa 100644
--- a/acts/tests/google/bt/test_tools/EnergyTest.py
+++ b/acts/tests/google/bt/test_tools/EnergyTest.py
@@ -17,7 +17,6 @@
Continuously poll for energy info for a single Android Device
"""
-from contextlib import suppress
from queue import Empty
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
@@ -30,7 +29,9 @@
@BluetoothBaseTest.bt_test_wrap
def test_continuous_energy_report(self):
while (True):
- with suppress(Exception):
+ try:
self.log.info(self.android_devices[
0].droid.bluetoothGetControllerActivityEnergyInfo(1))
+ except Exception:
+ self.log.error("Failed to log energy info... continuing.")
return True