Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/py/_process/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/py/_process/__pycache__/cmdexec.cpython-37.pyc

B

���]G�	@sxddlZddlZddlZddlmZmZdd�ZGdd�dejj�Zee_yde_	de_
Wneefk
rrYnXdS)	�N)�Popen�PIPEcCs�tj|ddtjtjd�}|��\}}tjddkr�yt��}Wn tk
r^tjj	pXd}YnXt
||jj	pn|�}t
||jj	p�|�}|��}|r�t
|||||��|S)a� return unicode output of executing 'cmd' in a separate process.

    raise cmdexec.Error exeception if the command failed.
    the exception will provide an 'err' attribute containing
    the error-output from the command.
    if the subprocess module does not provide a proper encoding/unicode strings
    sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'.
    T)�shell�universal_newlines�stdout�stderrr�zUTF-8)�
subprocessrr�communicate�sys�version_info�getdefaultencoding�AttributeErrorr�encoding�unicoder�poll�ExecutionFailed)�cmd�process�out�errZdefault_encoding�status�r�D/opt/alt/python37/lib/python3.7/site-packages/py/_process/cmdexec.py�cmdexecs	rc@seZdZdd�Zdd�ZdS)rcCs,t�|�||_||_||_||_||_dS)N)�	Exception�__init__r�systemstatusrrr)�selfrrrrrrrrr s
zExecutionFailed.__init__cCsd|j|j|jfS)NzExecutionFailed: %d  %s
%s)rrr)rrrr�__str__(szExecutionFailed.__str__N)�__name__�
__module__�__qualname__rrrrrrrsrzpy.process.cmdexec�Error)
rr	�pyrrr�errorr#rr!r r�	TypeErrorrrrr�<module>s