comparison mercurial/help.py @ 21796:8225bb1f0ad3

help: restore use of callable() since it was readded in Python 3.2
author Augie Fackler <raf@durin42.com>
date Mon, 23 Jun 2014 09:24:24 -0400
parents c3784e3c3e8d
children 26f7c8033bed e284de138f00
comparison
equal deleted inserted replaced
21795:711498bb4ff5 21796:8225bb1f0ad3
402 rst = [minirst.section(header)] 402 rst = [minirst.section(header)]
403 403
404 # description 404 # description
405 if not doc: 405 if not doc:
406 rst.append(" %s\n" % _("(no help text available)")) 406 rst.append(" %s\n" % _("(no help text available)"))
407 if util.safehasattr(doc, '__call__'): 407 if callable(doc):
408 rst += [" %s\n" % l for l in doc().splitlines()] 408 rst += [" %s\n" % l for l in doc().splitlines()]
409 409
410 if not ui.verbose: 410 if not ui.verbose:
411 omitted = (_('use "hg help -v %s" to show more complete help') % 411 omitted = (_('use "hg help -v %s" to show more complete help') %
412 name) 412 name)