diff hgext/convert/cvsps.py @ 14945:11aad09a6370

hgext: replace uses of hasattr with util.safehasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 20:37:12 -0500
parents 2114e44b08f6
children 4e5b7d130e76
line wrap: on
line diff
--- a/hgext/convert/cvsps.py	Mon Jul 25 15:30:19 2011 -0500
+++ b/hgext/convert/cvsps.py	Mon Jul 25 20:37:12 2011 -0500
@@ -11,6 +11,7 @@
 from mercurial import util
 from mercurial.i18n import _
 from mercurial import hook
+from mercurial import util
 
 class logentry(object):
     '''Class logentry has the following attributes:
@@ -513,8 +514,8 @@
                   e.comment == c.comment and
                   e.author == c.author and
                   e.branch == c.branch and
-                  (not hasattr(e, 'branchpoints') or
-                    not hasattr (c, 'branchpoints') or
+                  (not util.safehasattr(e, 'branchpoints') or
+                    not util.safehasattr (c, 'branchpoints') or
                     e.branchpoints == c.branchpoints) and
                   ((c.date[0] + c.date[1]) <=
                    (e.date[0] + e.date[1]) <=