Mercurial > public > mercurial-scm > hg
comparison contrib/win32/hgwebdir_wsgi.py @ 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 | efd3b71fc293 |
children | e7cfe3587ea4 |
comparison
equal
deleted
inserted
replaced
14973:5656cb5b9028 | 14974:a2aa75118837 |
---|---|
48 | 48 |
49 # Adjust python path if this is not a system-wide install | 49 # Adjust python path if this is not a system-wide install |
50 #sys.path.insert(0, r'c:\path\to\python\lib') | 50 #sys.path.insert(0, r'c:\path\to\python\lib') |
51 | 51 |
52 # Enable tracing. Run 'python -m win32traceutil' to debug | 52 # Enable tracing. Run 'python -m win32traceutil' to debug |
53 if hasattr(sys, 'isapidllhandle'): | 53 if getattr(sys, 'isapidllhandle', None) is not None: |
54 import win32traceutil | 54 import win32traceutil |
55 | 55 |
56 # To serve pages in local charset instead of UTF-8, remove the two lines below | 56 # To serve pages in local charset instead of UTF-8, remove the two lines below |
57 import os | 57 import os |
58 os.environ['HGENCODING'] = 'UTF-8' | 58 os.environ['HGENCODING'] = 'UTF-8' |