Updated config locations for new machine (and MIFARE serial port)
[uccvend-vendserver.git] / sql-edition / servers / SnackConfig.py
index e608f81..118cacd 100755 (executable)
@@ -2,7 +2,7 @@
 
 class VendingException( Exception ): pass
 
-FILENAME="snacks.conf"
+FILENAME="/etc/dispense2/snacks.conf"
 
 def parse_line( l ):
        toks = l.strip().split()
@@ -54,7 +54,7 @@ def get_snacks( filename = FILENAME ):
 def get_snack( slot ):
        
        snacks = get_snacks()
-       if slot not in key:
+       if slot not in snacks:
                raise VendingException( "Slot '%s' isn't in config file" % slot )
        
        return snacks[slot]

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