From 2ac910adcf0a1933211a73acdd8a5ecbfbd38436 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Thu, 29 Sep 2011 23:34:22 -0400 Subject: [PATCH] the right way to dynamically specify a module for import --- plinth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth.py b/plinth.py index 95d638c2e..fa08c16df 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: