comparison doc/runrst @ 15314:1ae824142c01 stable

runrst: improve error message when Docutils is missing Peter Toft told me he had installed a 'python-doc' package instead of the correct 'python-docutils' and he suggested that we add the URL to Docutils in our error message.
author Martin Geisler <mg@aragost.com>
date Thu, 20 Oct 2011 17:47:33 +0200
parents 13d79a7bf5b7
children 63eae465095e
comparison
equal deleted inserted replaced
15313:3eb1a90ea409 15314:1ae824142c01
18 from docutils.core import publish_cmdline 18 from docutils.core import publish_cmdline
19 from docutils import nodes, utils 19 from docutils import nodes, utils
20 except ImportError: 20 except ImportError:
21 sys.stderr.write("abort: couldn't generate documentation: docutils " 21 sys.stderr.write("abort: couldn't generate documentation: docutils "
22 "module is missing\n") 22 "module is missing\n")
23 sys.stderr.write("please install python-docutils or see "
24 "http://docutils.sourceforge.net/\n")
23 sys.exit(-1) 25 sys.exit(-1)
24 26
25 def role_hg(name, rawtext, text, lineno, inliner, 27 def role_hg(name, rawtext, text, lineno, inliner,
26 options={}, content=[]): 28 options={}, content=[]):
27 text = "hg " + utils.unescape(text) 29 text = "hg " + utils.unescape(text)