changeset 14957:16e5271b216f

hgweb: move remaining hasattr calls to safehasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 15:38:46 -0500
parents 1b3f5f603aef
children fd246aefedd3
files mercurial/hgweb/server.py mercurial/hgweb/webutil.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Mon Jul 25 15:38:10 2011 -0500
+++ b/mercurial/hgweb/server.py	Mon Jul 25 15:38:46 2011 -0500
@@ -248,7 +248,7 @@
     from threading import activeCount
     _mixin = SocketServer.ThreadingMixIn
 except ImportError:
-    if hasattr(os, "fork"):
+    if util.safehasattr(os, "fork"):
         _mixin = SocketServer.ForkingMixIn
     else:
         class _mixin(object):
--- a/mercurial/hgweb/webutil.py	Mon Jul 25 15:38:10 2011 -0500
+++ b/mercurial/hgweb/webutil.py	Mon Jul 25 15:38:46 2011 -0500
@@ -72,7 +72,7 @@
         d['date'] = s.date()
         d['description'] = s.description()
         d['branch'] = s.branch()
-        if hasattr(s, 'path'):
+        if util.safehasattr(s, 'path'):
             d['file'] = s.path()
         yield d