avoid to add the "config" header more than one time
@@ -127,8 +127,10 @@ def get_sysetting(key, default=None):
with open(sys_path) as file:
d_conf = file.read()
+ d_header = '[config]\n'
+
+ if(d_header not in d_conf):
with open(sys_path, 'w+') as file:
- d_conf = '[config]\n' + d_conf
file.write(d_conf)
config.read(sys_path)
