diff --git a/expandybird/expansion/sandbox_loader.py b/expandybird/expansion/sandbox_loader.py index bbed8473a..f0fcde48c 100644 --- a/expandybird/expansion/sandbox_loader.py +++ b/expandybird/expansion/sandbox_loader.py @@ -95,10 +95,11 @@ def process_imports(imports): # Now build the hierarchical modules. for k in imports.keys(): - if imports[k]['path'].endswith('.jinja'): + path = imports[k]['path'] + if path.endswith('.jinja'): continue # Normalize paths and trim .py extension, if any. - normalized = os.path.splitext(os.path.normpath(k))[0] + normalized = os.path.splitext(os.path.normpath(path))[0] # If this is actually a path and not an absolute name, split it and process # the hierarchical packages. if sep in normalized: