summaryrefslogtreecommitdiffhomepage
path: root/tests/test_packetizer.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-06-06 14:04:04 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-06-06 14:04:04 -0700
commitf0372ad11cc59e2b750fc3a3252f5ee3458ce623 (patch)
tree25f6944e44f8c26ca736e6da39a9ca0ad678491b /tests/test_packetizer.py
parentc5febfa0176be1d230aabf6bb4ed94731a60e325 (diff)
parent2804b79cdeb2c140862d48883b7fdc105f05b95a (diff)
Merge branch 'master' into 869-int
Diffstat (limited to 'tests/test_packetizer.py')
-rw-r--r--tests/test_packetizer.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_packetizer.py b/tests/test_packetizer.py
index a1ea398c..02173292 100644
--- a/tests/test_packetizer.py
+++ b/tests/test_packetizer.py
@@ -114,9 +114,13 @@ class PacketizerTest (unittest.TestCase):
import signal
class TimeoutError(Exception):
- pass
+ def __init__(self, error_message):
+ if hasattr(errno, 'ETIME'):
+ self.message = os.sterror(errno.ETIME)
+ else:
+ self.messaage = error_message
- def timeout(seconds=1, error_message=os.strerror(errno.ETIME)):
+ def timeout(seconds=1, error_message='Timer expired'):
def decorator(func):
def _handle_timeout(signum, frame):
raise TimeoutError(error_message)