Create datadir when nonexistent
This commit is contained in:
4
flow.py
4
flow.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user