From 6c8a3c4abdb29e8f2ec7b2157f173a8596a6e0e8 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Tue, 14 Jun 2011 18:59:07 +0200 Subject: [PATCH] remove debug output, avoid exception in finally --- sloth/conf/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sloth/conf/__init__.py b/sloth/conf/__init__.py index 32469ca..66f1501 100644 --- a/sloth/conf/__init__.py +++ b/sloth/conf/__init__.py @@ -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))