Skip to content

Commit 3053677

Browse files
committed
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
1 parent 460b9b3 commit 3053677

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roundup/cgi/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
try:
2424
from OpenSSL.SSL import SysCallError
2525
except ImportError:
26-
SysCallError = None
26+
class SysCallError(Exception):
27+
pass
2728

2829
from roundup import roundupdb, date, hyperdb, password
2930
from roundup.cgi import templating, cgitb, TranslationService

0 commit comments

Comments
 (0)