mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Raise when a WebSocket request is expected
This commit is contained in:
parent
6a989e655a
commit
026745a135
2 changed files with 2 additions and 2 deletions
|
@ -26,5 +26,5 @@
|
||||||
"logged_out" : "Logged out",
|
"logged_out" : "Logged out",
|
||||||
"not_logged_in" : "You are not logged in",
|
"not_logged_in" : "You are not logged in",
|
||||||
"server_already_running" : "A server is already running on that port",
|
"server_already_running" : "A server is already running on that port",
|
||||||
"websocket_request_excepted" : "Excepted a WebSocket request"
|
"websocket_request_expected" : "Expected a WebSocket request"
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,7 +276,7 @@ class _ActionsMapPlugin(object):
|
||||||
|
|
||||||
wsock = request.environ.get('wsgi.websocket')
|
wsock = request.environ.get('wsgi.websocket')
|
||||||
if not wsock:
|
if not wsock:
|
||||||
return HTTPErrorResponse(m18n.g('websocket_request_excepted'))
|
raise HTTPErrorResponse(m18n.g('websocket_request_expected'))
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
item = queue.get()
|
item = queue.get()
|
||||||
|
|
Loading…
Add table
Reference in a new issue