Skip to content

Commit 0424c50

Browse files
committed
dashed pass through arguments to uwsgi
Converts uwsgi pass through arguments by replacing underscores with dashes e.g.: #uwsgi --honour-stdin app.run(gevent=100, honour_stdin=True)
1 parent 5038190 commit 0424c50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flask_uwsgi_websocket/websocket.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def run(self, app=None, debug=False, host='localhost', port=5000, **kwargs):
8484
kwargs[k] = ''
8585

8686
# constructing uwsgi arguments
87-
uwsgi_args = ' '.join(['--{0} {1}'.format(k,v) for k,v in kwargs.items()])
87+
uwsgi_args = ' '.join(['--{0} {1}'.format(
88+
k.replace('_', '-'),
89+
v) for k,v in kwargs.items()])
8890
args = 'uwsgi --http {0}:{1} --http-websockets {2} --wsgi {3}'.format(host, port, uwsgi_args, app)
8991

9092
print(args)

0 commit comments

Comments
 (0)