From 771fcf4601badf4e2e3ddb2ff538f77d841bb5dc Mon Sep 17 00:00:00 2001 From: Andre Zoledziowski Date: Mon, 16 Apr 2018 16:31:35 +0200 Subject: [PATCH] BugFix: python3 compatiblity error --- base/kcconf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/kcconf.py b/base/kcconf.py index 5f313a8..82f3970 100644 --- a/base/kcconf.py +++ b/base/kcconf.py @@ -6,14 +6,14 @@ import os import os.path def configkopano(configs): - for filename, config in configs.iteritems(): + for filename, config in configs.items(): if not os.path.exists(filename): return with open(filename) as f: contents = f.read() f.close() - for key, newvalue in config.iteritems(): + for key, newvalue in config.items(): contents = re.sub(r"^\s*#?\s*{}\s*=.*".format(key), r"{} = {}".format(key, newvalue), contents, 0, re.MULTILINE) with open(filename, "w") as f: @@ -22,7 +22,7 @@ def configkopano(configs): def parseenvironmentvariables(prependingpath): configs = dict() - for name, value in os.environ.iteritems(): + for name, value in os.environ.items(): namematch = re.match(r"^KCCONF_([A-Z]+)_([A-Z0-9_]+)$", name) if namematch != None: filename = namematch.group(1).lower() + ".cfg"