Skip to content

Commit 5af2abb

Browse files
committed
fix(shutdownirq): no bare except
1 parent b266625 commit 5af2abb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shutdownirq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def announce():
111111
else:
112112
pulse_start = None
113113
pulse_end = None
114-
except:
114+
except Exception:
115115
pass
116116
else:
117117
import RPi.GPIO as GPIO
@@ -144,7 +144,7 @@ def announce():
144144
sys.exit()
145145
if GPIO.input(SHUTDOWN): # before looping we must make sure the shutdown signal went low
146146
GPIO.wait_for_edge(SHUTDOWN, GPIO.FALLING)
147-
except:
147+
except Exception:
148148
pass
149149
finally:
150150
GPIO.cleanup()

0 commit comments

Comments
 (0)