remove debug output, avoid exception in finally

This commit is contained in:
Martin Baeuml
2011-06-14 18:59:07 +02:00
parent f93375e088
commit 6c8a3c4abd
+1 -2
View File
@@ -12,13 +12,12 @@ class Config:
def update(self, module_path):
try:
oldpath = sys.path
module_path = os.path.abspath(module_path)
if module_path.endswith('.py'):
module_path = module_path[:-3]
module_dir, module_name = os.path.split(module_path)
oldpath = sys.path
sys.path = [module_dir, ] + sys.path
print sys.path
mod = importlib.import_module(module_name)
except ImportError, e:
raise ImportError("Could not import configuration '%s' (Is it on sys.path?): %s" % (module_path, e))