class VendingException( Exception ): pass
-FILENAME="snacks.conf"
+FILENAME="/etc/dispense/snacks.conf"
def parse_line( l ):
toks = l.strip().split()
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]
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