summaryrefslogtreecommitdiff
path: root/plinth.py
diff options
context:
space:
mode:
authorJames Vasile <james@hackervisions.org>2011-09-29 23:34:22 -0400
committerJames Vasile <james@hackervisions.org>2011-09-29 23:34:22 -0400
commit2ac910adcf0a1933211a73acdd8a5ecbfbd38436 (patch)
tree1092cd58d5c15014dccc37dd71b3be02767fa978 /plinth.py
parentccb47b4993c2f96317137141b325e0674112c5c6 (diff)
the right way to dynamically specify a module for import
Diffstat (limited to 'plinth.py')
-rwxr-xr-xplinth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plinth.py b/plinth.py
index 95d638c..fa08c16 100755
--- a/plinth.py
+++ b/plinth.py
@@ -54,7 +54,7 @@ def load_modules():
if name.endswith(".py") and not name.startswith('.'):
cfg.log.info("importing modules/%s" % name)
try:
- exec("import modules.%s" % (name[:-3]))
+ __import__("modules.%s" % (name[:-3]))
except ImportError, e:
cfg.log.error(_("Couldn't import modules/%s: %s") % (name, e))
else: