Skip to content

Commit 332fa35

Browse files
committed
Make the WSGI script name configurable
1 parent 85589b9 commit 332fa35

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

webware/Scripts/WaitressServer.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def openBrowser():
5353
del environ['WEBWARE_DEVELOPMENT']
5454
try:
5555
# get application from WSGI script
56-
with open('Scripts/WSGIScript.py') as f:
56+
with open(args.wsgi_script) as f:
5757
script = f.read()
5858
# set development flag in the script
5959
script = script.replace(
@@ -70,7 +70,7 @@ def openBrowser():
7070

7171
print("Waitress serving Webware application...")
7272
args = vars(args)
73-
for arg in 'browser reload reload_interval prod'.split():
73+
for arg in 'browser reload reload_interval prod wsgi_script'.split():
7474
del args[arg]
7575
if args['trusted_proxy_headers']:
7676
args['trusted_proxy_headers'] = args[
@@ -150,6 +150,11 @@ def addArguments(parser):
150150
help="Do not set development mode",
151151
default=False,
152152
)
153+
parser.add_argument(
154+
'--wsgi-script',
155+
help='The file path of the WSGI script',
156+
default='Scripts/WSGIScript.py',
157+
)
153158

154159

155160
def main(args=None):

0 commit comments

Comments
 (0)