comparison roundup/scripts/roundup_server.py @ 1907:0b0cd279780e

handle socket timeout exception (thanks Marcus Priesch)
author Richard Jones <richard@users.sourceforge.net>
date Tue, 11 Nov 2003 21:51:52 +0000
parents db97431125a5
children 3f2d1671ec03
comparison
equal deleted inserted replaced
1906:f255363e6d97 1907:0b0cd279780e
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.32 2003-10-25 12:26:42 jlgijsbers Exp $ 19 $Id: roundup_server.py,v 1.33 2003-11-11 21:51:52 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
76 self.inner_run_cgi() 76 self.inner_run_cgi()
77 except client.NotFound: 77 except client.NotFound:
78 self.send_error(404, self.path) 78 self.send_error(404, self.path)
79 except client.Unauthorised: 79 except client.Unauthorised:
80 self.send_error(403, self.path) 80 self.send_error(403, self.path)
81 except socket.timeout:
82 s = StringIO.StringIO()
83 traceback.print_exc(None, s)
84 self.log_message(str(s.getvalue()))
81 except: 85 except:
82 # it'd be nice to be able to detect if these are going to have 86 # it'd be nice to be able to detect if these are going to have
83 # any effect... 87 # any effect...
84 self.send_response(400) 88 self.send_response(400)
85 self.send_header('Content-Type', 'text/html') 89 self.send_header('Content-Type', 'text/html')

Roundup Issue Tracker: http://roundup-tracker.org/