comparison mercurial/commands.py @ 14943:d3bb825ddae3

globally: use safehasattr(x, '__call__') instead of hasattr(x, '__call__')
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 16:24:37 -0500
parents ebdfdba0faaf
children a4435770cf57
comparison
equal deleted inserted replaced
14942:5b072d4b62f2 14943:d3bb825ddae3
2730 raise error.UnknownCommand(name) 2730 raise error.UnknownCommand(name)
2731 2731
2732 # description 2732 # description
2733 if not doc: 2733 if not doc:
2734 doc = _("(no help text available)") 2734 doc = _("(no help text available)")
2735 if hasattr(doc, '__call__'): 2735 if util.safehasattr(doc, '__call__'):
2736 doc = doc() 2736 doc = doc()
2737 2737
2738 ui.write("%s\n\n" % header) 2738 ui.write("%s\n\n" % header)
2739 ui.write("%s\n" % minirst.format(doc, textwidth, indent=4)) 2739 ui.write("%s\n" % minirst.format(doc, textwidth, indent=4))
2740 try: 2740 try: