Fix preislister config

This commit is contained in:
Sebastian Pipping 2012-02-01 22:39:11 +01:00
parent 00d4c81b28
commit c7a140843d
1 changed files with 4 additions and 0 deletions

View File

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