Fix actually compatibility with non-ssl envirronments

This commit is contained in:
Valentin Lorentz 2010-12-12 14:33:36 +01:00
parent a58e270516
commit 49dfa69b91

View File

@ -39,7 +39,9 @@ import select
import socket import socket
try: try:
import ssl import ssl
SSLError = ssl.SSLError
except: except:
class SSLError(Exception):
pass pass
import supybot.log as log import supybot.log as log
@ -144,7 +146,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
self.irc.feedMsg(msg) self.irc.feedMsg(msg)
except socket.timeout: except socket.timeout:
pass pass
except ssl.SSLError, e: except SSLError, e:
if e.args[0] == 'The read operation timed out': if e.args[0] == 'The read operation timed out':
pass pass
else: else: