diff --git a/preislister/main.py b/preislister/main.py index a424d2b..b746e51 100755 --- a/preislister/main.py +++ b/preislister/main.py @@ -15,6 +15,7 @@ import shutil sys.path.insert(0, '../client-barcode') # TODO from freitagslib.network import _request from freitagslib.item import Item +from freitagslib.settings import settings, Settings _NAME_BLACKLIST = ('foo', ) @@ -38,6 +39,9 @@ if __name__ == '__main__': sys.exit(1) output_filename = sys.argv[1] + if not settings.load('../client-barcode/freitagskasse.conf'): + sys.exit(1) + content = _request('buyable/item/', None, method='GET') doc = json.loads(content) items = [Item(e) for e in doc]