From 494d28d854080c5117b516d80e5e0acf24aa17ac Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sun, 17 Nov 2019 10:55:26 -0500 Subject: [PATCH] clean temporary variable off the stack --- buttond.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buttond.py b/buttond.py index e8e818b..1f2691b 100755 --- a/buttond.py +++ b/buttond.py @@ -63,6 +63,12 @@ for b in config.get('button', 'names').split(','): print('Error configuring button', b, e) continue +try: + # clear temp variables off the stack + del pin, closed, opened +except (NameError): + pass + if __name__ == '__main__': try: pause()