Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.py @ 2201:2a5892e1f2ab maint-0.6
socket timeout error logging can fail
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 09 Apr 2004 01:31:16 +0000 |
| parents | 2fe25413867f |
| children |
comparison
equal
deleted
inserted
replaced
| 2199:340497d2381e | 2201:2a5892e1f2ab |
|---|---|
| 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 16 # | 16 # |
| 17 """ HTTP Server that serves roundup. | 17 """ HTTP Server that serves roundup. |
| 18 | 18 |
| 19 $Id: roundup_server.py,v 1.26.2.5 2004-02-15 22:22:20 richard Exp $ | 19 $Id: roundup_server.py,v 1.26.2.6 2004-04-09 01:28:24 richard Exp $ |
| 20 """ | 20 """ |
| 21 | 21 |
| 22 # python version check | 22 # python version check |
| 23 from roundup import version_check | 23 from roundup import version_check |
| 24 | 24 |
| 85 except client.Unauthorised: | 85 except client.Unauthorised: |
| 86 self.send_error(403, self.path) | 86 self.send_error(403, self.path) |
| 87 except: | 87 except: |
| 88 exc, val, tb = sys.exc_info() | 88 exc, val, tb = sys.exc_info() |
| 89 if hasattr(socket, 'timeout') and exc == socket.timeout: | 89 if hasattr(socket, 'timeout') and exc == socket.timeout: |
| 90 s = StringIO.StringIO() | 90 self.log_error('timeout') |
| 91 traceback.print_exc(None, s) | |
| 92 self.log_message(str(s.getvalue())) | |
| 93 else: | 91 else: |
| 94 # it'd be nice to be able to detect if these are going to have | 92 # it'd be nice to be able to detect if these are going to have |
| 95 # any effect... | 93 # any effect... |
| 96 self.send_response(400) | 94 self.send_response(400) |
| 97 self.send_header('Content-Type', 'text/html') | 95 self.send_header('Content-Type', 'text/html') |
