Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 4638:1ebc5f16aeda
Ignore OpenSSL.SSL.SysCallError similar to IOError.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Tue, 10 Jul 2012 12:00:32 +0200 |
| parents | 4f9c3858b671 |
| children | 70b1cb9034c3 |
comparison
equal
deleted
inserted
replaced
| 4631:227e7f8614dd | 4638:1ebc5f16aeda |
|---|---|
| 4 | 4 |
| 5 import base64, binascii, cgi, codecs, mimetypes, os | 5 import base64, binascii, cgi, codecs, mimetypes, os |
| 6 import quopri, random, re, rfc822, stat, sys, time | 6 import quopri, random, re, rfc822, stat, sys, time |
| 7 import socket, errno | 7 import socket, errno |
| 8 from traceback import format_exc | 8 from traceback import format_exc |
| 9 | |
| 10 try: | |
| 11 from OpenSSL.SSL import SysCallError | |
| 12 except ImportError: | |
| 13 SysCallError = None | |
| 9 | 14 |
| 10 from roundup import roundupdb, date, hyperdb, password | 15 from roundup import roundupdb, date, hyperdb, password |
| 11 from roundup.cgi import templating, cgitb, TranslationService | 16 from roundup.cgi import templating, cgitb, TranslationService |
| 12 from roundup.cgi.actions import * | 17 from roundup.cgi.actions import * |
| 13 from roundup.exceptions import * | 18 from roundup.exceptions import * |
| 481 self.serve_file(designator) | 486 self.serve_file(designator) |
| 482 except SendStaticFile, file: | 487 except SendStaticFile, file: |
| 483 self.serve_static_file(str(file)) | 488 self.serve_static_file(str(file)) |
| 484 except IOError: | 489 except IOError: |
| 485 # IOErrors here are due to the client disconnecting before | 490 # IOErrors here are due to the client disconnecting before |
| 486 # recieving the reply. | 491 # receiving the reply. |
| 492 pass | |
| 493 except SysCallError: | |
| 494 # OpenSSL.SSL.SysCallError is similar to IOError above | |
| 487 pass | 495 pass |
| 488 | 496 |
| 489 except SeriousError, message: | 497 except SeriousError, message: |
| 490 self.write_html(str(message)) | 498 self.write_html(str(message)) |
| 491 except Redirect, url: | 499 except Redirect, url: |
