# HG changeset patch # User Augie Fackler # Date 1311626326 18000 # Node ID 16e5271b216fa1414f86ca7dad6ed92634d38f38 # Parent 1b3f5f603aef7f4217598668b30544b6a8215149 hgweb: move remaining hasattr calls to safehasattr diff -r 1b3f5f603aef -r 16e5271b216f mercurial/hgweb/server.py --- 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): diff -r 1b3f5f603aef -r 16e5271b216f mercurial/hgweb/webutil.py --- 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