Commits

jaraco  committed 20a6bdc

Fixed some shortcomings in wsgi script

  • Participants
  • Parent commits 7c07aa9

Comments (0)

Files changed (1)

File server/moin-isapi-wsgi.py

 import sys
 import os
 
+if hasattr(sys, 'isapidllhandle'):
+	import win32traceutil
+
 # a) Configuration of Python's code search path
 #    If you already have set up the PYTHONPATH environment variable for the
 #    stuff you see below, you don't need to do a1) and a2).
 #os.environ['MOIN_DEBUG'] = '1'
 
 
-from MoinMoin.server.server_wsgi import moinmoinApp
-import isapi_wsgi
-import isapi
-
 def factory():
 	"The entry point for when the ISAPIDLL is triggered"
 	try:
-		return isapi_wsgi.ISAPISimpleHandler(moinmoinApp())
+		import isapi_wsgi
+		from MoinMoin.server.server_wsgi import moinmoinApp
+		return isapi_wsgi.ISAPISimpleHandler(moinmoinApp)
 	except:
+		import traceback
 		print("Traceback occurred starting up the application")
 		traceback.print_exc()