Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions scapy/sendrecv.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import errno
import cPickle,os,sys,time,subprocess
import itertools
from select import select
from select import select, error as select_error

from scapy.arch.consts import DARWIN, FREEBSD, OPENBSD
from scapy.data import *
from scapy.config import conf
Expand Down Expand Up @@ -140,8 +141,9 @@ def sndrcv(pks, pkt, timeout = None, inter = 0, verbose=None, chainCC=0, retry=0
inp = []
try:
inp, out, err = select(inmask,[],[], remaintime)
except IOError, exc:
if exc.errno != errno.EINTR:
except (IOError, select_error) as exc:
# select.error has no .errno attribute
if exc.args[0] != errno.EINTR:
raise
if len(inp) == 0:
break
Expand Down