Mercurial > p > roundup > code
view roundup/anypy/html.py @ 7655:91fad2d2c4b3
fix: exit quickly on keyboard interrupt
When exiting roundup_server (issue was seen in use of roundup_demo)
using ^C, the keyboard interrupt message is generated but the
application didn't exit until the 60 second socket timeout is
complete.
This seems to be more of an issue with Windows.
With this change the socket is explicitly shut down telling the client
what's happening. Then the file descriptor is closed.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 06 Oct 2023 21:43:56 -0400 |
| parents | ff57db595a58 |
| children | 7f888f046857 |
line wrap: on
line source
try: from html import escape as html_escape_ # python 3 def html_escape(str, quote=False): # html_escape under python 3 sets quote to true by default # make it python 2 compatible return html_escape_(str, quote=quote) except ImportError: # python 2 fallback from cgi import escape as html_escape # noqa: F401
