DispenseInterface and OpenDispense Implimentation created and tested. Not curruntly...
[uccvend-vendserver.git] / VendServer / VendServer.py
index 8fbf11e..d079b4e 100755 (executable)
@@ -887,6 +887,7 @@ def handle_mifare_event(state, event, params, v, vstatus):
                         (center('SORRY'), False, 0.5)])
                vstatus.cur_user = ''
                vstatus.cur_pin = ''
+               _last_card_id = -1
        
                reset_idler(v, vstatus, 2)
                return
@@ -1185,7 +1186,8 @@ def do_vend_server(options, config_opts):
                        logging.info("Trying again in 5 seconds.")
                        sleep(5)
 
-if __name__ == '__main__':
+
+def main(argv=None):
        options, config_opts = set_stuff_up()
        while True:
                try:
@@ -1215,3 +1217,5 @@ if __name__ == '__main__':
                        sleep(10)
                        logging.warning("Trying again anyway (might not help, but hey...)")
 
+if __name__ == '__main__':
+       sys.exit(main())

UCC git Repository :: git.ucc.asn.au