From 0243dfb69acbe4a34d76070c5ee5688df004f511 Mon Sep 17 00:00:00 2001 From: Bram Veenboer Date: Sun, 27 Dec 2015 15:24:40 +0100 Subject: [PATCH] Create datadir when nonexistent --- flow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow.py b/flow.py index fdce862..ab19009 100644 --- a/flow.py +++ b/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 \ No newline at end of file + break