Mercurial > hg > mercurial-source
changeset 11686:13d79a7bf5b7 stable
runrst: try to be more helpful if docutils is not installed
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Fri, 30 Jul 2010 14:41:47 +0900 |
parents | 18c47562d331 |
children | 3e561b6af810 |
files | doc/runrst |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/runrst +++ b/doc/runrst @@ -13,9 +13,14 @@ """ import sys -from docutils.parsers.rst import roles -from docutils.core import publish_cmdline -from docutils import nodes, utils +try: + from docutils.parsers.rst import roles + from docutils.core import publish_cmdline + from docutils import nodes, utils +except ImportError: + sys.stderr.write("abort: couldn't generate documentation: docutils " + "module is missing\n") + sys.exit(-1) def role_hg(name, rawtext, text, lineno, inliner, options={}, content=[]):