From: Phil Howard Date: Tue, 20 Aug 2019 15:34:23 +0000 (+0100) Subject: Replaced exception pass with log warning X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/commitdiff_plain/2c6a2d7204a1618695a9c5df5da306daeca6e41b Replaced exception pass with log warning --- 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)