From c788e0467ca17cb3ef26f4e46e78e5edca52f6f9 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 7 Dec 2008 23:17:29 +0100 Subject: [PATCH] Added better error message for missing roman.py --- sphinx/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 9a41d4a04..43343ff29 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -31,17 +31,23 @@ def main(argv=sys.argv): errstr = str(err) if errstr.lower().startswith('no module named'): whichmod = errstr[16:] + hint = '' if whichmod.startswith('docutils'): whichmod = 'Docutils library' elif whichmod.startswith('jinja'): whichmod = 'Jinja library' elif whichmod == 'roman': whichmod = 'roman module (which is distributed with Docutils)' + hint = ('This can happen if you upgraded docutils using\n' + 'easy_install without uninstalling the old version' + 'first.') else: whichmod += ' module' print >>sys.stderr, \ 'Error: The %s cannot be found. Did you install Sphinx '\ 'and its dependencies correctly?' % whichmod + if hint: + print >> sys.stderr, hint return 1 raise return cmdline.main(argv)