From 2278a73752969f87e1c549b94beddc64af4e6d75 Mon Sep 17 00:00:00 2001 From: DeWitt Clinton Date: Tue, 29 Aug 2006 09:43:03 -0700 Subject: [PATCH] Clarify which module was not imported when a failure occurs. --- planet/shell/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/planet/shell/__init__.py b/planet/shell/__init__.py index ba8ea78..6ee2e94 100644 --- a/planet/shell/__init__.py +++ b/planet/shell/__init__.py @@ -13,9 +13,10 @@ def run(template_file, doc): base,ext = os.path.splitext(os.path.basename(template_resolved)) try: - module = __import__('planet/shell/' + ext[1:]) + module_path = os.path.join('planet', 'shell', ext[1:]) + module = __import__(module_path) except: - return log.error("Skipping template %s", template_resolved) + return log.error("Skipping template %s", module_path) log.info("Processing template %s", template_resolved) output_dir = planet.config.output_dir()