1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 07:56:12 +00:00

BugFix: KCCOMMENT and KCUNCOMMENT buggy

This commit is contained in:
Andre Zoledziowski 2018-06-28 10:32:54 +02:00
parent a07eb594f1
commit 0c7f5102d4
No known key found for this signature in database
GPG Key ID: 2A72044119624966

View File

@ -41,17 +41,21 @@ def parseenvironmentvariables(prependingpath):
commentmatch = re.match(r"^KCCOMMENT_([A-Z]+)_([A-Z0-9_]+)$", name)
if commentmatch != None:
filename = commentmatch.group(1).lower() + ".cfg"
if prependingpath + filename not in configs:
configs[prependingpath + filename] = dict()
try:
configs[prependingpath + filename]["kccomment"].append(value)
except IndexError:
except KeyError:
configs[prependingpath + filename]["kccomment"] = []
configs[prependingpath + filename]["kccomment"].append(value)
uncommentmatch = re.match(r"^KCUNCOMMENT_([A-Z]+)_([A-Z0-9_]+)$", name)
if uncommentmatch != None:
filename = uncommentmatch.group(1).lower() + ".cfg"
if prependingpath + filename not in configs:
configs[prependingpath + filename] = dict()
try:
configs[prependingpath + filename]["kunccomment"].append(value)
except IndexError:
configs[prependingpath + filename]["kunccomment"] = []
configs[prependingpath + filename]["kunccomment"].append(value)
configs[prependingpath + filename]["kcuncomment"].append(value)
except KeyError:
configs[prependingpath + filename]["kcuncomment"] = []
configs[prependingpath + filename]["kcuncomment"].append(value)
return configs