hg: use safehasattr instead of hasattr
authorAugie Fackler <durin42@gmail.com>
Mon, 25 Jul 2011 15:22:18 -0500
changeset 14952 4c523a2af6e7
parent 14951 61807854004e
child 14953 6ee6ecf1ee89
hg: use safehasattr instead of hasattr
mercurial/hg.py
--- a/mercurial/hg.py	Mon Jul 25 15:19:43 2011 -0500
+++ b/mercurial/hg.py	Mon Jul 25 15:22:18 2011 -0500
@@ -537,7 +537,7 @@
 
 def remoteui(src, opts):
     'build a remote ui from ui or repo and opts'
-    if hasattr(src, 'baseui'): # looks like a repository
+    if util.safehasattr(src, 'baseui'): # looks like a repository
         dst = src.baseui.copy() # drop repo-specific config
         src = src.ui # copy target options from repo
     else: # assume it's a global ui object