U {_ @ s d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZddlZddl m Z G dd deZd d Z ddedfdd Zdd ZG dd deZdS )zk Timeout decorator. :copyright: (c) 2012-2013 by PN. :license: MIT, see LICENSE for more details. )print_function)unicode_literals)divisionNwrapsc @ s" e Zd ZdZdddZdd ZdS ) TimeoutErrorz>Thrown when a timeout occurs in the `timeout` context manager. Timed Outc C s || _ d S N)value)selfr r T/opt/alt/python38/lib/python3.8/site-packages/timeout_decorator/timeout_decorator.py__init__ s zTimeoutError.__init__c C s t | jS r )reprr r r r r __str__" s zTimeoutError.__str__N)r )__name__ __module____qualname____doc__r r r r r r r s r c C s |dkr| n| |dS )z This function checks if a exception message is given. If there is no exception message, the default behaviour is maintained. If there is an exception message, the message is passed to the exception with the 'value' keyword. Nr ) exceptionexception_messager r r _raise_exception&