Socket: Only catch select.error if it is an interupted system call.

This commit is contained in:
Valentin Lorentz 2013-06-29 13:44:42 +02:00
parent 75654a4544
commit dce3c97fe4

View File

@ -36,6 +36,7 @@ from __future__ import division
import sys
import time
import errno
import select
import socket
import supybot.log as log
@ -164,8 +165,10 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
for instance in cls._instances:
if instance.conn in rlist:
instance._read()
except select.error: # 'Interrupted system call'
pass
except select.error as e:
if e.args[0] != errno.EINTR:
# 'Interrupted system call'
raise
finally:
cls._selecting[0] = False
for instance in cls._instances: