changeset 83:58eed691dca7

debugging
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 11 Nov 2013 19:18:58 -0800
parents b57de7c38a74
children daf3a05a05fe
files pyloader/factory.py pyloader/loader.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pyloader/factory.py	Thu Jul 28 17:00:03 2011 -0700
+++ b/pyloader/factory.py	Mon Nov 11 19:18:58 2013 -0800
@@ -20,9 +20,10 @@
 class CircularReferenceError(Exception):
     """factory has detected a circular reference"""
 
+
 class PyFactory(object):
 
-    # to evaluate arguments as objects 
+    # to evaluate arguments as objects
     delimeters = ('%(', ')s')
 
     def __init__(self, config=None, main=''):
--- a/pyloader/loader.py	Thu Jul 28 17:00:03 2011 -0700
+++ b/pyloader/loader.py	Mon Nov 11 19:18:58 2013 -0800
@@ -12,7 +12,12 @@
 
 def import_dotted_path(module):
   path = module.split('.')
-  module = __import__(module)
+  try:
+    module = __import__(module)
+  except:
+    sys.stderr.write("pyloader: Error importing %s for dotted path %s\n" % (module, path))
+    raise
+
   for name in path[1:]:
     module = getattr(module, name)
   return module