aboutsummaryrefslogtreecommitdiffstats
path: root/reaktor/getconf.py
diff options
context:
space:
mode:
Diffstat (limited to 'reaktor/getconf.py')
-rw-r--r--reaktor/getconf.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/reaktor/getconf.py b/reaktor/getconf.py
index e513e31..cfb38f5 100644
--- a/reaktor/getconf.py
+++ b/reaktor/getconf.py
@@ -1,6 +1,6 @@
-#getconf = make_getconf("dateiname.json")
-#getconf(key) -> value
-#oder error
+# getconf = make_getconf("dateiname.json")
+# getconf(key) -> value
+# oder error
import imp
import os
@@ -9,9 +9,8 @@ import os
def make_getconf(filename):
def getconf(prop, default_value=None):
prop_split = prop.split('.')
- string = ''
config = load_config(filename)
- #imp.reload(config)
+ # imp.reload(config)
tmp = config.__dict__
for pr in prop_split:
if pr in tmp:
@@ -26,9 +25,10 @@ def make_getconf(filename):
def load_config(filename):
dirname = os.path.dirname(filename)
modname, ext = os.path.splitext(os.path.basename(filename))
- file, pathname, description = imp.find_module(modname, [ dirname ])
+ file, pathname, description = imp.find_module(modname, [dirname])
try:
ret = imp.load_module(modname, file, pathname, description)
finally:
- if file: file.close()
+ if file:
+ file.close()
return ret