help command: use safehasattr instead of hasattr
authorAugie Fackler <durin42@gmail.com>
Mon, 25 Jul 2011 15:36:13 -0500
changeset 14954 ce7e3014fda7
parent 14953 6ee6ecf1ee89
child 14955 6349a9eb0178
help command: use safehasattr instead of hasattr
mercurial/commands.py
--- 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: