Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 5429:daa19de102a2
Python 3 preparation: make fallback SysCallError an actual exception class.
The code defines a fallback version of SysCallError when import of
OpenSSL.SSL. But in Python 3, defining it as None and then using in
"except" statements results in:
TypeError: catching classes that do not inherit from BaseException is
not allowed
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Wed, 25 Jul 2018 09:56:22 +0000 |
| parents | a0ed8d5d744f |
| children | 407c75df2851 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Wed Jul 25 09:55:10 2018 +0000 +++ b/roundup/cgi/client.py Wed Jul 25 09:56:22 2018 +0000 @@ -23,7 +23,8 @@ try: from OpenSSL.SSL import SysCallError except ImportError: - SysCallError = None + class SysCallError(Exception): + pass from roundup import roundupdb, date, hyperdb, password from roundup.cgi import templating, cgitb, TranslationService
