Mercurial > p > roundup > code
view roundup/anypy/xmlrpc_.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 | e46ce04d5bbc |
| children | db10c0a1f338 |
line wrap: on
line source
try: # Python 3+. from xmlrpc import client, server except ImportError: # Python 2. import xmlrpclib as client import SimpleXMLRPCServer as server
