Mercurial > p > roundup > code
diff roundup/cgi/wsgi_handler.py @ 7692:8fb42f41ef10 issue2550923_computed_property
merge in default branch to see if ti clears a travis-ci build error on 2.7 python; default branch builds fine
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 11 Sep 2023 00:10:29 -0400 |
| parents | 273c8c2b5042 |
| children | 0fe2b9f6e19f |
line wrap: on
line diff
--- a/roundup/cgi/wsgi_handler.py Mon Jul 10 17:31:34 2023 -0400 +++ b/roundup/cgi/wsgi_handler.py Mon Sep 11 00:10:29 2023 -0400 @@ -21,6 +21,15 @@ BaseHTTPRequestHandler = http_.server.BaseHTTPRequestHandler DEFAULT_ERROR_MESSAGE = http_.server.DEFAULT_ERROR_MESSAGE +try: + # python2 is missing this definition + http_.server.BaseHTTPRequestHandler.responses[429] +except KeyError: + http_.server.BaseHTTPRequestHandler.responses[429] = ( + 'Too Many Requests', + 'The user has sent too many requests in ' + 'a given amount of time ("rate limiting")' + ) class Headers(object): """ Idea more or less stolen from the 'apache.py' in same directory.
