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)