ble.py - add history try block
This commit is contained in:
1 parent
2469338298
commit
eb1ec71499
1 file changed
+3
@@ -296,6 +296,7 @@ def test(test_count = 0, bt_usb_id = None) -> None:
|
|||||||
print("Done")
|
print("Done")
|
||||||
prev_list_snapshot = None
|
prev_list_snapshot = None
|
||||||
print("Just before the loop")
|
print("Just before the loop")
|
||||||
|
try:
|
||||||
while not test_result:
|
while not test_result:
|
||||||
# Check if the failed list has been the same for 5 loops
|
# Check if the failed list has been the same for 5 loops
|
||||||
print("Check if the failed list has been the same for 5 loops")
|
print("Check if the failed list has been the same for 5 loops")
|
||||||
@@ -313,6 +314,8 @@ def test(test_count = 0, bt_usb_id = None) -> None:
|
|||||||
reset_adapter()
|
reset_adapter()
|
||||||
mac_history = []
|
mac_history = []
|
||||||
prev_list_snapshot = current_list
|
prev_list_snapshot = current_list
|
||||||
|
except Exception as e:
|
||||||
|
log.error(f"Something went wrong in the history loop - {e}")
|
||||||
|
|
||||||
log.info(f" Test run: {test_count} - loop {test_loop_count} start. Initializing run...")
|
log.info(f" Test run: {test_count} - loop {test_loop_count} start. Initializing run...")
|
||||||
test_run_results = sensor_data_query(test_list)
|
test_run_results = sensor_data_query(test_list)
|
||||||
|
|||||||
Reference in new issue
Block a user