2011-07-05 21:20:55 +02:00
|
|
|
"""WSGI interface"""
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
_absfile = os.path.abspath(__file__)
|
|
|
|
_filedir = os.path.dirname(_absfile)
|
|
|
|
try:
|
|
|
|
import mege.server as server
|
|
|
|
except ImportError:
|
|
|
|
sys.path.insert(0, os.path.join(_filedir, 'mege'))
|
|
|
|
import mege.server as server
|
|
|
|
os.chdir(_filedir)
|
2011-07-09 00:47:30 +02:00
|
|
|
|
|
|
|
try:
|
|
|
|
application = server.MegeApplication()
|
|
|
|
except Exception as e:
|
|
|
|
import traceback
|
|
|
|
with open('.nohifinallog', 'w') as f:
|
|
|
|
print(e, file=f)
|
|
|
|
print(traceback.format_exc(), file=f)
|