mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
socket: Fix compatibility issue with Python 3 (introduced in 8cf094a
).
This commit is contained in:
parent
bcde88ab4d
commit
790f0eea35
@ -143,7 +143,9 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
for inst in cls._instances:
|
for inst in cls._instances:
|
||||||
# Do not use a list comprehension here, we have to edit the list
|
# Do not use a list comprehension here, we have to edit the list
|
||||||
# and not to reassign it.
|
# and not to reassign it.
|
||||||
if inst.conn._sock.__class__ is socket._closedsocket:
|
if (sys.version_info[0] == 3 and inst.conn._closed) or \
|
||||||
|
(sys.version_info[0] == 2 and
|
||||||
|
inst.conn._sock.__class__ is socket._closedsocket):
|
||||||
cls._instances.remove(inst)
|
cls._instances.remove(inst)
|
||||||
if not cls._instances:
|
if not cls._instances:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user