summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-02-20 14:47:15 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-02-20 14:47:15 -0800
commit72be58b2292b0321adae39a3c4403589a4d09c7f (patch)
treed72bb033112b06a4c38364089f571a1610dbb2ec /tests
parent6830a905cc38261d9e4054b87294959dac6a1b5c (diff)
parentc28f97708e519a2522a349132fe7650e33e2b4dc (diff)
Merge branch '2.1'
Diffstat (limited to 'tests')
-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)