diff --git a/amodem/stream.py b/amodem/stream.py index 4268d17..9673f31 100644 --- a/amodem/stream.py +++ b/amodem/stream.py @@ -4,10 +4,6 @@ import logging log = logging.getLogger(__name__) -class Timeout(Exception): - pass - - class Reader(object): def __init__(self, fd, data_type=None, bufsize=4096, @@ -51,6 +47,6 @@ class Reader(object): time.sleep(self.wait) - raise Timeout(self.timeout) + raise IOError('timeout') __next__ = next diff --git a/tests/test_stream.py b/tests/test_stream.py index 8805bd1..e959f3c 100644 --- a/tests/test_stream.py +++ b/tests/test_stream.py @@ -31,5 +31,5 @@ def test_read(): try: for buf in f: pass - except stream.Timeout as e: - assert e.args == (f.timeout,) + except IOError as e: + assert e.args == ('timeout',)