Skip to content

Commit

Permalink
correct double GPIO cleanup for INterrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
wodowiesel committed Dec 25, 2023
1 parent 6393709 commit 0bcf82f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/pifunklite.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,16 @@ def logger ():
play_mic ()

except KeyboardInterrupt:
GPIO.cleanup() ## clean up GPIO on CTRL+C exit

GPIO.cleanup() ## clean up GPIO on normal exit
GPIO.cleanup () ## clean up GPIO on CTRL+C exit

except:
print("\nERROR\n")
print ("\nERROR\n")
pass

GPIO.cleanup () ## clean up GPIO on normal exit

##------------------------------------------------------------------------------

## test-area
#nosetests

print ("\nEnd of script!\n")

0 comments on commit 0bcf82f

Please sign in to comment.