Create datadir when nonexistent

This commit is contained in:
Bram Veenboer
2015-12-27 15:24:40 +01:00
parent 3b92594fb7
commit 0243dfb69a

View File

@@ -20,6 +20,8 @@ class Flow:
self.datadir = datadir
if not os.path.exists(jsondir):
os.makedirs(jsondir)
if not os.path.exists(datadir):
os.makedirs(datadir)
self.period = 2 # weeks
self.file = file
@@ -121,4 +123,4 @@ class Flow:
if line != '':
print("test:", line.rstrip())
else:
break
break