Hacked By AnonymousFox
B
���a� � @ s� d Z ddlmZ ddlmZmZmZmZ yddlmZ W n e k
rV d
dd�ZY nX ydd lm
Z
W n e k
r� dd
d�Z
Y nX dS )z�Backward compatibility layer with older version of six.
This is used to avoid virtualenv requring a version of six newer than what
the system may have.
� )�absolute_import)�PY2�PY3�binary_type� text_type)�ensure_text�utf-8�strictc C s8 t | t�r| �||�S t | t�r$| S tdt| � ��dS )z�Coerce *s* to six.text_type.
For Python 2:
- `unicode` -> `unicode`
- `str` -> `unicode`
For Python 3:
- `str` -> `str`
- `bytes` -> decoded to `str`
znot expecting type '%s'N)�
isinstancer �decoder � TypeError�type)�s�encoding�errors� r �D/opt/alt/python37/lib/python3.7/site-packages/virtualenv/util/six.pyr s
r )�
ensure_strc C sX t | ttf�stdt| � ��tr:t | t�r:| �||�} ntrTt | t�rT| �||�} | S )z�Coerce *s* to `str`.
For Python 2:
- `unicode` -> encoded to `str`
- `str` -> `str`
For Python 3:
- `str` -> `str`
- `bytes` -> decoded to `str`
znot expecting type '%s') r
r r r r
r �encoder r )r r r r r r r # s r N)r r )r r )�__doc__�
__future__r Zsixr r r r r �ImportErrorr r r r r �<module> s
Hacked By AnonymousFox1.0, Coded By AnonymousFox