1

The application is based on flask and bootstrap 3. I have a modal with the options (data-backdrop="static", data-keyboard="false") to keep it from being closed when users click or use the escape key. Clicks are ignored but the escape key causes the flask application to crash with a traceback indicating a broken pipe.

I believe the HTML is correct. I'm not sure why the bootstrap modal option is ignored and why the flask app is crashing.

HTML:

<div class="modal fade" role="dialog" id="working-modal"
    data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-body">
                <h4 class="modal-title text-center">Working</h4>
            </div>
        </div>
    </div>
</div>

Log file:

File "/home/zinnia/.virtualenvs/px/local/lib/python2.7/site-packages/werkzeug/serving.py", line 499, in serve_forever
  HTTPServer.serve_forever(self)
File "/usr/lib/python2.7/SocketServer.py", line 233, in serve_forever
  self._handle_request_noblock()
File "/usr/lib/python2.7/SocketServer.py", line 292, in _handle_request_noblock
  self.handle_error(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
  self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
  self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
  self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
  self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
  self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
  self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
  self._sock.sendall(view[write_offset:write_offset+buffer_size])
socket.error: [Errno 32] Broken pipe
user3566831
  • 21
  • 1
  • 4

0 Answers0