diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-10-04 15:25:10 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-10-04 15:25:10 +0200 |
commit | 6672aad7101f3593fde1009c36d0dde92ebc6512 (patch) | |
tree | 93f7f7b8fc1ed255ce76bfb299fad43663a00b98 /base.py | |
parent | 43da93801ba35497c41a745f61c6c23739e7871a (diff) | |
download | mensa-6672aad7101f3593fde1009c36d0dde92ebc6512.tar.gz mensa-6672aad7101f3593fde1009c36d0dde92ebc6512.tar.bz2 mensa-6672aad7101f3593fde1009c36d0dde92ebc6512.zip |
Fixed backends, make run script configurable
Diffstat (limited to 'base.py')
-rw-r--r-- | base.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -11,6 +11,13 @@ class Food : class NoMenuError(Exception) : """ gets raised if there's no menu""" + +class Frontend(object) : + def __init__(self, name, human_name, description="", optional_args=[]) : + self.name = name + self.human_name = human_name + self.description = description + self.optional_args = [] def formt (food) : cat = [] @@ -40,7 +47,6 @@ class Restaurant(object): def get_food(self,**opt_args) : return self.module.get_food_items(*self.obligatory_args, **opt_args) - def register_restaurant(restaurant): global foodsources foodsources[restaurant.name] = (restaurant) |