diff options
| author | ianb <devnull@localhost> | 2005-07-17 22:45:53 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-07-17 22:45:53 +0000 |
| commit | 0d66a0954deee1443524c8b5d070c036aeaf4c82 (patch) | |
| tree | d27ee44100e5f3e143ac9330054f035d188be045 /paste | |
| parent | c73d708616767e7bd141d8ffd9ef3ce94f8597e9 (diff) | |
| download | paste-0d66a0954deee1443524c8b5d070c036aeaf4c82.tar.gz | |
Provide a more complete ImportError message
Diffstat (limited to 'paste')
| -rw-r--r-- | paste/util/thirdparty.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/paste/util/thirdparty.py b/paste/util/thirdparty.py index 0883372..7944ede 100644 --- a/paste/util/thirdparty.py +++ b/paste/util/thirdparty.py @@ -44,12 +44,12 @@ def add_package(package_name): """ try: exec "import %s" % package_name - except ImportError: + except ImportError, e: path = os.path.join(third_party, '%s-files' % package_name) if os.path.exists(path): sys.path.append(path) else: raise ImportError( "Cannot load the package %s; expected to find it in " - "%s. Have you run build-pkg.py?" - % (package_name, path)) + "%s. Have you run build-pkg.py? (import gave error: %s)" + % (package_name, path, e)) |
