mirror of https://github.com/scrapy/scrapy.git
don't hide original exception in scrapy.utils.misc.load_object
This commit is contained in:
parent
7be3479c20
commit
5086262913
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue