Browse Source

Fix preislister config

Sebastian Pipping 9 years ago
parent
commit
c7a140843d
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      preislister/main.py

+ 4
- 0
preislister/main.py View File

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

Loading…
Cancel
Save