%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
a
�_g�W � @ s< d Z ddlmZmZmZ ddlZddlZddlZddlZddl m
Z
ddlmZ ddlm
Z
ddlmZ ddlmZ g d �Ze
r�d
ndZdd� Zd
d� ZG dd� de�Zddedfdd�Zddedfdd�Zdd� Zdd� Zdd� ZeZdd� ZG dd� de�ZG d d!� d!e�ZG d"d#� d#e �Z!G d$d%� d%e�Z"d&d'� Z#dS )(z
Low-level utilities.
� )�absolute_import�print_function�divisionN)�
getcurrent)�perf_counter)�PYPY)�thread_mod_name)�_NONE)�format_run_info�print_run_info�GreenletTree�wrap_errors�assert_switches� c C s d S �N� r r r �8/vddos/python/lib/python3.9/site-packages/gevent/util.py�_noop! s r c C s dS �NFr r r r r �_ready$ s r c @ s8 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� ZdS )
r
a�
Helper to make function return an exception, rather than raise it.
Because every exception that is unhandled by greenlet will be logged,
it is desirable to prevent non-error exceptions from leaving a greenlet.
This can done with a simple ``try/except`` construct::
def wrapped_func(*args, **kwargs):
try:
return func(*args, **kwargs)
except (TypeError, ValueError, AttributeError) as ex:
return ex
This class provides a shortcut to write that in one line::
wrapped_func = wrap_errors((TypeError, ValueError, AttributeError), func)
It also preserves ``__str__`` and ``__repr__`` of the original function.
c C s || _ || _t�| |� dS )z�
Calling this makes a new function from *func*, such that it catches *errors* (an
:exc:`BaseException` subclass, or a tuple of :exc:`BaseException` subclasses) and
return it as a value.
N)�_wrap_errors__errors�_wrap_errors__func� functools�update_wrapper)�self�errors�funcr r r �__init__= s zwrap_errors.__init__c
O sF | j }z||i |��W S | jy@ } z|W Y d }~S d }~0 0 d S r )r r )r �args�kwargsr �exr r r �__call__H s
zwrap_errors.__call__c C s
t | j�S r )�strr �r r r r �__str__O s zwrap_errors.__str__c C s
t | j�S r )�reprr r# r r r �__repr__R s zwrap_errors.__repr__c C s t | j|�S r )�getattrr �r �namer r r �__getattr__U s zwrap_errors.__getattr__N) �__name__�
__module__�__qualname__�__doc__r r! r$ r&