mirror of
				https://github.com/zokradonh/kopano-docker
				synced 2025-10-31 10:27:14 +00:00 
			
		
		
		
	BugFix: KCCOMMENT and KCUNCOMMENT buggy
This commit is contained in:
		
							parent
							
								
									a07eb594f1
								
							
						
					
					
						commit
						0c7f5102d4
					
				| @ -41,17 +41,21 @@ def parseenvironmentvariables(prependingpath): | |||||||
|         commentmatch = re.match(r"^KCCOMMENT_([A-Z]+)_([A-Z0-9_]+)$", name) |         commentmatch = re.match(r"^KCCOMMENT_([A-Z]+)_([A-Z0-9_]+)$", name) | ||||||
|         if commentmatch != None: |         if commentmatch != None: | ||||||
|             filename = commentmatch.group(1).lower() + ".cfg" |             filename = commentmatch.group(1).lower() + ".cfg" | ||||||
|  |             if prependingpath + filename not in configs: | ||||||
|  |                 configs[prependingpath + filename] = dict() | ||||||
|             try:  |             try:  | ||||||
|                 configs[prependingpath + filename]["kccomment"].append(value) |                 configs[prependingpath + filename]["kccomment"].append(value) | ||||||
|             except IndexError: |             except KeyError: | ||||||
|                 configs[prependingpath + filename]["kccomment"] = [] |                 configs[prependingpath + filename]["kccomment"] = [] | ||||||
|                 configs[prependingpath + filename]["kccomment"].append(value) |                 configs[prependingpath + filename]["kccomment"].append(value) | ||||||
|         uncommentmatch = re.match(r"^KCUNCOMMENT_([A-Z]+)_([A-Z0-9_]+)$", name) |         uncommentmatch = re.match(r"^KCUNCOMMENT_([A-Z]+)_([A-Z0-9_]+)$", name) | ||||||
|         if uncommentmatch != None: |         if uncommentmatch != None: | ||||||
|             filename = uncommentmatch.group(1).lower() + ".cfg" |             filename = uncommentmatch.group(1).lower() + ".cfg" | ||||||
|  |             if prependingpath + filename not in configs: | ||||||
|  |                 configs[prependingpath + filename] = dict() | ||||||
|             try:  |             try:  | ||||||
|                 configs[prependingpath + filename]["kunccomment"].append(value) |                 configs[prependingpath + filename]["kcuncomment"].append(value) | ||||||
|             except IndexError: |             except KeyError: | ||||||
|                 configs[prependingpath + filename]["kunccomment"] = [] |                 configs[prependingpath + filename]["kcuncomment"] = [] | ||||||
|                 configs[prependingpath + filename]["kunccomment"].append(value) |                 configs[prependingpath + filename]["kcuncomment"].append(value) | ||||||
|     return configs |     return configs | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user