comparison mercurial/hgweb/webcommands.py @ 36248:0ef50a5e3ae1

hgweb: translate Abort in help command to 404 error c3784e3c3e8d changed the exception type to be raised if unknowncmd=False.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 27 Dec 2015 13:08:51 +0900
parents baca93a47992
children a748a5d1d7c3
comparison
equal deleted inserted replaced
36247:48a6b1a22ccf 36248:0ef50a5e3ae1
1401 topic = topicname 1401 topic = topicname
1402 subtopic = None 1402 subtopic = None
1403 1403
1404 try: 1404 try:
1405 doc = helpmod.help_(u, commands, topic, subtopic=subtopic) 1405 doc = helpmod.help_(u, commands, topic, subtopic=subtopic)
1406 except error.UnknownCommand: 1406 except error.Abort:
1407 raise ErrorResponse(HTTP_NOT_FOUND) 1407 raise ErrorResponse(HTTP_NOT_FOUND)
1408 return tmpl('help', topic=topicname, doc=doc) 1408 return tmpl('help', topic=topicname, doc=doc)
1409 1409
1410 # tell hggettext to extract docstrings from these functions: 1410 # tell hggettext to extract docstrings from these functions:
1411 i18nfunctions = commands.values() 1411 i18nfunctions = commands.values()