diff hgext/mq.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 e9ed3506f066
children 3709cca378ff
line wrap: on
line diff
--- a/hgext/mq.py	Mon Jul 25 14:59:55 2011 -0500
+++ b/hgext/mq.py	Mon Jul 25 16:24:37 2011 -0500
@@ -938,7 +938,7 @@
                         p.write("# User " + user + "\n")
                     if date:
                         p.write("# Date %s %s\n\n" % date)
-                if hasattr(msg, '__call__'):
+                if util.safehasattr(msg, '__call__'):
                     msg = msg()
                 commitmsg = msg and msg or ("[mq]: %s" % patchfn)
                 n = repo.commit(commitmsg, user, date, match=match, force=True)