X-Git-Url: https://git.ucc.asn.au/?p=zanchey%2Fdispense2.git;a=blobdiff_plain;f=sql-edition%2Fservers%2FSnackConfig.py;h=118cacd9c458e7c07d0801184335135f357a3f19;hp=e608f8143dda792f829d719804240f7f484d1449;hb=4e04b6c18a0b9143de528d917db9c8e3089ca5ec;hpb=3b9f8220a4e4604a4d05fdbca2ff98719769f1bb diff --git a/sql-edition/servers/SnackConfig.py b/sql-edition/servers/SnackConfig.py index e608f81..118cacd 100755 --- a/sql-edition/servers/SnackConfig.py +++ b/sql-edition/servers/SnackConfig.py @@ -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]