| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/defer/__pycache__/ |
Upload File : |
o
�r�a�W � @ s� d Z dZdZddlZddlmZ ddlZddlZddl m
Z
e
jZej
jdkZG d d
� d
e�ZG dd� de�ZG d
d� de�ZG dd� de�Zdd� Zdd� Zdd� Zdd� Zdd� ZdS )z-Small framework for asynchronous programming.z%Sebastian Heinlein <devel@glatzor.de>)�Deferred�AlreadyCalledDeferred�DeferredException�defer�inline_callbacks�return_value� N��wraps� )�version� c @ s e Zd ZdZdd� ZdS )�_DefGen_Returnz5Exception to return a result from an inline callback.c C s
|| _ d S �N)�value)�selfr � r �0/usr/lib/python3/dist-packages/defer/__init__.py�__init__S s
z_DefGen_Return.__init__N)�__name__�
__module__�__qualname__�__doc__r r r r r r
Q s r
c @ s e Zd ZdZdS )r z+The Deferred is already running a callback.N)r r r r r r r r r W s r c @ s* e Zd ZdZd dd�Zdd� Zdd� ZdS )
r zAllows to defer exceptions.Nc C sR || _ || _|| _t|t�r|j| _ || _dS |r|s't�� \| _ | _| _dS dS )a� Return a new DeferredException instance.
If type, value and traceback are not specified the infotmation
will be retreieved from the last caught exception:
>>> try:
... raise Exception("Test")
... except:
... deferred_exc = DeferredException()
>>> deferred_exc.raise_exception()
Traceback (most recent call last):
...
Exception: Test
Alternatively you can set the exception manually:
>>> exception = Exception("Test 2")
>>> deferred_exc = DeferredException(exception)
>>> deferred_exc.raise_exception()
Traceback (most recent call last):
...
Exception: Test 2
N)�typer � traceback�
isinstance� Exception� __class__�sys�exc_info)r r r r r r r r ^ s
�zDeferredException.__init__c C s&