diff mercurial/commands.py @ 14954:ce7e3014fda7

help command: use safehasattr instead of hasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 15:36:13 -0500
parents a4435770cf57
children 70e11de6964d
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Jul 25 16:27:08 2011 -0500
+++ b/mercurial/commands.py	Mon Jul 25 15:36:13 2011 -0500
@@ -2648,7 +2648,7 @@
         doc = gettext(entry[0].__doc__)
         if not doc:
             doc = _("(no help text available)")
-        if hasattr(entry[0], 'definition'):  # aliased command
+        if util.safehasattr(entry[0], 'definition'):  # aliased command
             if entry[0].definition.startswith('!'):  # shell alias
                 doc = _('shell alias for::\n\n    %s') % entry[0].definition[1:]
             else: