Open the space when the switch is toggled while we are closed
[saartuer.git] / tuerd
diff --git a/tuerd b/tuerd
index 5c91f92a6f3f117b076dfe96d20ebe3297f4a689..1bee788341c776acbb894475409707ea2e78a611 100755 (executable)
--- a/tuerd
+++ b/tuerd
@@ -3,7 +3,16 @@ import RPi.GPIO as GPIO
 import statemachine, actor, pins, tysock, waker
 from libtuer import logger
 import argparse
-# TODO: implement some arguments, e.g. --debug which does not send e-mails and prints debug stuff
+
+# Parse arguments
+parser = argparse.ArgumentParser(description='Run a door')
+parser.add_argument("-d", "--debug",
+                                       action="store_true", dest="debug",
+                                       help="Don't send emails")
+args = parser.parse_args()
+if args.debug:
+       import libtuer
+       libtuer.mailAddress = []
 
 # initialize GPIO stuff
 GPIO.setmode(GPIO.BOARD)