X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=test%2Ftest_punt.py;fp=test%2Ftest_punt.py;h=8ee43f1ed73f82e82088669f0d61dd207baa7df1;hp=e6829d42bb3cc3684f66f9bef39f5123dabed27e;hb=853cc9f2ad3ee52cbdd891fb09d51c25678baed0;hpb=b3ee84d0bb531f0600e3c038e78680c083e5bb77 diff --git a/test/test_punt.py b/test/test_punt.py index e6829d42bb3..8ee43f1ed73 100644 --- a/test/test_punt.py +++ b/test/test_punt.py @@ -6,6 +6,7 @@ import threading import copy import fcntl import time +import errno try: import unittest2 as unittest @@ -55,7 +56,7 @@ class serverSocketThread(threading.Thread): # Ethernet self.rx_pkts.append(Ether(data[8:])) except IOError as e: - if e.errno == 11: + if e.errno == errno.EAGAIN: # nothing to receive, stop running or sleep a little if self.stop_running: break