mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
minimaws: easier mod_wsgi deployment (nw)
This commit is contained in:
parent
cf1f9cc6bb
commit
9fbded3fa1
2 changed files with 11 additions and 3 deletions
|
@ -589,6 +589,8 @@ class MiniMawsApp(object):
|
|||
|
||||
def __call__(self, environ, start_response):
|
||||
application_uri = wsgiref.util.application_uri(environ)
|
||||
if application_uri[-1] != '/':
|
||||
application_uri += '/'
|
||||
module = wsgiref.util.shift_path_info(environ)
|
||||
if module == 'machine':
|
||||
return MachineHandler(self, application_uri, environ, start_response)
|
||||
|
|
|
@ -78,13 +78,17 @@
|
|||
## and see dependent slots update. Required command-line arguments to
|
||||
## produce the selected configuration are also displayed.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
import lib.auxverbs
|
||||
import lib.lxparse
|
||||
import lib.wsgiserve
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
@ -135,3 +139,5 @@ if __name__ == '__main__':
|
|||
lib.wsgiserve.run_server(options)
|
||||
elif options.command == 'load':
|
||||
lib.lxparse.load_info(options)
|
||||
else:
|
||||
application = lib.wsgiserve.MiniMawsApp(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'minimaws.sqlite3'))
|
||||
|
|
Loading…
Reference in a new issue