handle the case where we couldn't even import deps.

Fixes ticket 147 on trac.
This commit is contained in:
Thomas Vander Stichele
2013-08-24 00:33:57 +02:00
parent 120d1b239f
commit 1e9886d422

View File

@@ -30,6 +30,8 @@ and assure it doesn't raise an exception.
sys.exit(1)
# now load the main function
h = None
try:
from morituri.common import deps
from morituri.extern.deps import deps as edeps
@@ -38,6 +40,9 @@ try:
from morituri.rip import main
sys.exit(main.main(sys.argv[1:]))
except ImportError, e:
if not h:
# we couldn't even import deps, so reraise
raise
h.handleImportError(e)
sys.exit(1)
except edeps.DependencyError: