append to config file, not rewrite

This commit is contained in:
Bela 2018-11-02 16:40:47 +01:00
parent aed1fccc6f
commit 3339b2773b

View file

@ -206,8 +206,11 @@ def writeConfig(installdir, formdir):
write one line per info, no line if info is None write one line per info, no line if info is None
""" """
try: try:
with open(CONFIGFILE, "w+") as configfile: with open(CONFIGFILE, "a+") as configfile:
# w = write # a = append
# if you use only the last entries in the configfile this is OK
# and you do not overwrite what might be interesting to
# the user
# + = create if not exist # + = create if not exist
if installdir is not None: if installdir is not None:
print(CONFIG_INSTALLDIR + CONFIG_SEPARATOR + print(CONFIG_INSTALLDIR + CONFIG_SEPARATOR +