HEX
Server: Apache
System: Linux aura.ambarhosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User: chicagos (1295)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/leapp/__pycache__/compat.cpython-36.pyc
3

�S4b`�@s�ddlZddlZddlZdZejdkZeZfZer�ddlZe	e
�d	d
fZedZddlm
Z
e
�d	Zd
d�Zddd�Zn<ddljZddlZe	fZe	ZejZdd�Zddd�Zdd�Z
dS)�N�string_types�
IS_PYTHON2�
IS_PYTHON3�httplib�unicode_type�raise_with_traceback��__builtins__�unicode�)rcs,dd����fdd�}��fdd�}||fS)NcSs t|t�dd�r|St|�S)Nr	r
)�
isinstance�globalsr)�u�r�#/root/tmp_leapp_py3/leapp/compat.py�usszgettext_setup.<locals>.uscs�j�|��S)N)Zugettext)�msg)�trrr�singularszgettext_setup.<locals>.singularcs�j�|��|�|�S)N)Z	ungettext)Zmsg1Zmsg2�n)rrrr�plural szgettext_setup.<locals>.pluralr)rrrr)rrr�
gettext_setupsrcCstj||r|jd�nd�dS)Nzutf-8)�locale�	setlocale�encode)�category�locrrrr%srcCs|j}|j}||fS)N)�gettext�ngettext)rrrrrrr0scCstj||�dS)N)rr)rrrrrr5scCs|j|��dS)a�
        This is a helper function to raise exceptions with a traceback.

        This is function is required to workaround the syntax changes between Python 2 and 3
        Python 3.4 introduced a with_traceback method to Exception classes and Python 3 removed the syntax
        which used to be used in Python 2.

        :param exc: Exception to raise
        :param tb:  Traceback to use
        :return: Nothing
        N)�with_traceback)�exc�tbrrrr8s)rrrrrr)r)N)N)rr�sys�__all__�version_inforrrr�strr
rZleapp.compatpy2onlyrZ
builtins_dictrrZhttp.clientZclient�builtins�__dict__rrrr�<module>s,