changeset 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 6ee6ecf1ee89
children 6349a9eb0178
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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: