Skip to content
Snippets Groups Projects
Commit edd60884 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

config file has a more beautyfull format and 600 mode

parent 4bed9c30
No related branches found
No related tags found
No related merge requests found
......@@ -302,6 +302,8 @@ class GajimCore:
except:
print _("creating %s") % fname
fic = open(fname, "w")
import stat
os.chmod(fname, stat.S_IRUSR | stat.S_IWUSR)
fic.close()
self.cfgParser = common.optparser.OptionsParser(CONFPATH)
for part in default_tab.keys():
......
......@@ -82,10 +82,15 @@ class OptionsParser:
except:
log.debug("Can't write config %s" % self.__fname)
return 0
index = 0
for s in self.tab.keys():
fd.write('[' + s + ']\n\n')
if index == 0:
fd.write('[' + s + ']\n')
else:
fd.write('\n[' + s + ']\n')
for o in self.tab[s].keys():
fd.write(o + ' = ' + str(self.tab[s][o]) + '\n')
index += 1
return 1
# END writeCfgFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment