mirror of
https://github.com/wassname/sloth.git
synced 2026-10-02 12:40:07 +08:00
remove debug output, avoid exception in finally
This commit is contained in:
1 parent
f93375e088
commit
6c8a3c4abd
1 file changed
+1
-2
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user