summaryrefslogtreecommitdiffstats
path: root/module/config/ConfigParser.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/config/ConfigParser.py')
-rw-r--r--module/config/ConfigParser.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/config/ConfigParser.py b/module/config/ConfigParser.py
index 82c6a9f91..d7ecab5a0 100644
--- a/module/config/ConfigParser.py
+++ b/module/config/ConfigParser.py
@@ -5,7 +5,7 @@ from time import sleep
from os.path import exists
from gettext import gettext
-from module.utils import chmod
+from module.utils.fs import chmod
CONF_VERSION = 2
@@ -64,6 +64,10 @@ class ConfigParser:
f.write("version: " + str(CONF_VERSION))
f.close()
print "Old version of %s deleted" % conf
+ else:
+ f = open(conf, "wb")
+ f.write("version:" + str(CONF_VERSION))
+ f.close()
except Exception, ex:
e = ex
@@ -115,7 +119,7 @@ class ConfigParser:
for c in (self.CONFIG, self.PLUGIN):
f = open(c, "wb")
configs.append(f)
- chmod(c)
+ chmod(c, 0600)
f.write("version: %i\n\n" % CONF_VERSION)