Skip to content
Snippets Groups Projects
Commit b96be3de authored by Matt Johnston's avatar Matt Johnston
Browse files

item pricing works now

parent 3bdf6f5c
No related merge requests found
......@@ -2,7 +2,7 @@
class VendingException( Exception ): pass
FILENAME="snacks.conf"
FILENAME="/etc/dispense/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]
......
......@@ -17,6 +17,7 @@ from MessageKeeper import MessageKeeper
from HorizScroll import HorizScroll
from random import random, seed
from Idler import GreetingIdler,TrainIdler,GrayIdler,StringIdler,ClockIdler,FortuneIdler,FileIdler,PipeIdler
from SnackConfig import get_snacks, get_snack
import socket
from posix import geteuid
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment