From 6672aad7101f3593fde1009c36d0dde92ebc6512 Mon Sep 17 00:00:00 2001 From: Gabriel Pérez-Cerezo Date: Wed, 4 Oct 2017 15:25:10 +0200 Subject: Fixed backends, make run script configurable --- base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'base.py') diff --git a/base.py b/base.py index 2660607..df7bd4a 100644 --- a/base.py +++ b/base.py @@ -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) -- cgit v1.2.3