HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/self/root/lib64/python3.6/site-packages/ldap/__pycache__/compat.cpython-36.pyc
3

�`a��@sdZddlZddlZejddkr�ddlmZmZddlmZddlmZddlm	Z
ddlmZdd	lmZdd
l
mZdd�Z	ed
�nHddl
mZeZddlmZmZm	Z	mZddlmZdd
lmZdd�ZyddlmZWn,ek
�rejejBdfdd�ZYnXdS)z#Compatibility wrappers for Py2/Py3.�N�)�UserDict�IterableUserDict)�quote)�
quote_plus)�unquote)�urlopen)�urlparse)�MutableMappingcCs|jd�}t|�}|jd�S)z0Specialized unquote that uses UTF-8 for parsing.�asciizutf-8)�encode�urllib_unquote�decode)ZuriZunquoted�r�/usr/lib64/python3.6/compat.pyrs
raRdef reraise(exc_type, exc_value, exc_traceback):
        """Re-raise an exception given information from sys.exc_info()

        Note that unlike six.reraise, this does not support replacing the
        traceback. All arguments must come from a single sys.exc_info() call.
        """
        raise exc_type, exc_value, exc_traceback
    )r)rrrr	cCs|�dS)z�Re-raise an exception given information from sys.exc_info()

        Note that unlike six.reraise, this does not support replacing the
        traceback. All arguments must come from a single sys.exc_info() call.
        Nr)�exc_type�	exc_value�
exc_tracebackrrr�reraise'sr)�whichcs"dd�}tjj��r&|�|�r"�SdS|dkr>tjjdtj�}|sFdS|jtj�}tj	dkr�tj
|krt|jdtj
�tjjdd�jtj�}t�fd	d
�|D��r��g}q‡fdd�|D�}n�g}t
�}xT|D]L}tjj|�}||kr�|j|�x(|D] }	tjj||	�}
||
|�r�|
Sq�Wq�WdS)
aKGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        cSs&tjj|�o$tj||�o$tjj|�S)N)�os�path�exists�access�isdir)�fn�moderrr�
_access_checkDszwhich.<locals>._access_checkN�PATHZwin32rZPATHEXT�c3s |]}�j�j|j��VqdS)N)�lower�endswith)�.0�ext)�cmdrr�	<genexpr>aszwhich.<locals>.<genexpr>csg|]}�|�qSrr)r"r#)r$rr�
<listcomp>dszwhich.<locals>.<listcomp>)rr�dirname�environ�get�defpath�split�pathsep�sys�platform�curdir�insert�any�set�normcase�add�join)r$rrrZpathext�files�seen�dirZnormdirZthefile�namer)r$rr7s8







r)�__doc__r-r�version_inforrZurllibrrrr
rr	�collectionsr
�execZurllib.parseZurllib.request�collections.abcrZshutilr�ImportError�F_OK�X_OKrrrr�<module>s.