diff contrib/win32/hgwebdir_wsgi.py @ 22198:77142de48ae4

cleanup: make sure we always access members of imported modules This will make sure we get import errors, even if demandimport is enabled. This will also mute some pyflakes 'imported but unused' warnings.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 15 Aug 2014 04:37:45 +0200
parents e7cfe3587ea4
children d3da97e58d42
line wrap: on
line diff
--- a/contrib/win32/hgwebdir_wsgi.py	Fri Aug 15 20:28:51 2014 +0900
+++ b/contrib/win32/hgwebdir_wsgi.py	Fri Aug 15 04:37:45 2014 +0200
@@ -52,6 +52,7 @@
 # Enable tracing. Run 'python -m win32traceutil' to debug
 if getattr(sys, 'isapidllhandle', None) is not None:
     import win32traceutil
+    win32traceutil.SetupForPrint # silence unused import warning
 
 # To serve pages in local charset instead of UTF-8, remove the two lines below
 import os
@@ -90,6 +91,6 @@
     return isapi_wsgi.ISAPISimpleHandler(handler)
 
 if __name__=='__main__':
-    from isapi.install import *
+    from isapi.install import ISAPIParameters, HandleCommandLine
     params = ISAPIParameters()
     HandleCommandLine(params)