Merge pull request #902 from scrapy/load_object_full_traceback

[MRG] scrapy.utils.misc.load_object should print full traceback
This commit is contained in:
Pablo Hoffman 2014-10-02 00:33:27 -03:00
commit 9e2c60430d
1 changed files with 1 additions and 4 deletions

View File

@ -41,10 +41,7 @@ def load_object(path):
raise ValueError("Error loading object '%s': not a full path" % path)
module, name = path[:dot], path[dot+1:]
try:
mod = import_module(module)
except ImportError as e:
raise ImportError("Error loading object '%s': %s" % (path, e))
mod = import_module(module)
try:
obj = getattr(mod, name)