From c41470197e684fc2f19d8057c867fb75ca59f074 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Wed, 24 Dec 2014 18:26:08 -0200 Subject: [PATCH] create config dir --- twister-control.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twister-control.py b/twister-control.py index 30f76c4b..10d37f25 100755 --- a/twister-control.py +++ b/twister-control.py @@ -45,6 +45,9 @@ def loadConfig(): pass def saveConfig(): + configDir = os.path.dirname(configFilename) + if not os.path.exists(configDir): + os.makedirs(os.path.dirname(configDir)) with open(configFilename, "wb") as csvfile: writer = csv.writer(csvfile, delimiter='=', escapechar='\\', quoting=csv.QUOTE_NONE) for key, value in sorted(configOptions.items(), key=operator.itemgetter(0)):