changeset 14974:a2aa75118837

win32/hgwebdir_wsgi: use getattr instead of hasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 16:09:18 -0500
parents 5656cb5b9028
children b64538363dbe
files contrib/win32/hgwebdir_wsgi.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/win32/hgwebdir_wsgi.py	Mon Jul 25 16:08:57 2011 -0500
+++ b/contrib/win32/hgwebdir_wsgi.py	Mon Jul 25 16:09:18 2011 -0500
@@ -50,7 +50,7 @@
 #sys.path.insert(0, r'c:\path\to\python\lib')
 
 # Enable tracing. Run 'python -m win32traceutil' to debug
-if hasattr(sys, 'isapidllhandle'):
+if getattr(sys, 'isapidllhandle', None) is not None:
     import win32traceutil
 
 # To serve pages in local charset instead of UTF-8, remove the two lines below