FunctionTimedOut inherits TimeoutError

This commit is contained in:
Edvard Rejthar 2019-11-07 13:57:37 +01:00
parent 50baa8db50
commit 7531c64f9b
4 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,6 @@
* 4.3.6 - unreleased
- FunctionTimedOut inherits TimeoutError instead of BaseException
* 4.3.5 - Aug 19 2019

View File

@ -31,7 +31,7 @@ This is the function wherein you pass the timeout, the function you want to call
**Example**
So, for esxample, if you have a function "doit('arg1', 'arg2')" that you want to limit to running for 5 seconds, with func\_timeout you can call it like this:
So, for example, if you have a function "doit('arg1', 'arg2')" that you want to limit to running for 5 seconds, with func\_timeout you can call it like this:
from func_timeout import func_timeout, FunctionTimedOut

View File

@ -39,7 +39,7 @@ This is the function wherein you pass the timeout, the function you want to call
**Example**
So, for esxample, if you have a function "doit('arg1', 'arg2')" that you want to limit to running for 5 seconds, with func\_timeout you can call it like this:
So, for example, if you have a function "doit('arg1', 'arg2')" that you want to limit to running for 5 seconds, with func\_timeout you can call it like this:
from func\_timeout import func\_timeout, FunctionTimedOut

View File

@ -9,7 +9,7 @@ __all__ = ('FunctionTimedOut', 'RETRY_SAME_TIMEOUT')
RETRY_SAME_TIMEOUT = 'RETRY_SAME_TIMEOUT'
class FunctionTimedOut(BaseException):
class FunctionTimedOut(TimeoutError):
'''
FunctionTimedOut - Exception raised when a function times out
@ -51,7 +51,7 @@ class FunctionTimedOut(BaseException):
if not msg:
msg = self.getMsg()
BaseException.__init__(self, msg)
TimeoutError.__init__(self, msg)
self.msg = msg