From 2c6a2d7204a1618695a9c5df5da306daeca6e41b Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Tue, 20 Aug 2019 16:34:23 +0100 Subject: [PATCH 1/1] Replaced exception pass with log warning --- examples/all-in-one.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/all-in-one.py b/examples/all-in-one.py index 85a9a15..eef99c3 100755 --- a/examples/all-in-one.py +++ b/examples/all-in-one.py @@ -102,7 +102,7 @@ factor = 0.8 cpu_temps = [get_cpu_temperature()] * 5 delay = 0.5 # Debounce the proximity tap -mode = 0 # The starting mode +mode = 0 # The starting mode last_page = 0 light = 1 @@ -194,7 +194,7 @@ try: try: data = pms5003.read() except pmsReadTimeoutError: - pass + logging.warn("Failed to read PMS5003") else: data = data.pm_ug_per_m3(1.0) display_text(variables[mode], data, unit) @@ -205,7 +205,7 @@ try: try: data = pms5003.read() except pmsReadTimeoutError: - pass + logging.warn("Failed to read PMS5003") else: data = data.pm_ug_per_m3(2.5) display_text(variables[mode], data, unit) @@ -216,7 +216,7 @@ try: try: data = pms5003.read() except pmsReadTimeoutError: - pass + logging.warn("Failed to read PMS5003") else: data = data.pm_ug_per_m3(10) display_text(variables[mode], data, unit) -- 2.30.2