ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/clcommon/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/clcommon/utils.pyo

�
b=0Yc@s;ddlZdefd��YZdd�Zd�ZdS(i����NtExternalProgramFailedcBseZd�ZRS(cCstj||�dS(N(t	Exceptiont__init__(tselftmessage((s2/usr/lib/python2.7/site-packages/clcommon/utils.pyRs(t__name__t
__module__R(((s2/usr/lib/python2.7/site-packages/clcommon/utils.pyRscCs�dj|�}y=tj|dtd�dtjdtjdtd|�}Wn/tk
r}}td|t	|�f��nX|j
�\}}|jd	kr�t|p�d
||f��n|S(sv
    Runs external process and returns output
    @param cmd: command and arguments as a list
    @return: string
    t tstdins	/dev/nulltstdouttstderrt	close_fdstenvs%s. Can not run command: %sisoutput of the command: %s
%s(tjoint
subprocesstPopentopentPIPEtSTDOUTtTruetOSErrorRtstrtcommunicatet
returncode(tcmdtenv_datatcmd_linetoutputtoserrtstd_outtstd_err((s2/usr/lib/python2.7/site-packages/clcommon/utils.pytrun_commands		
 cCs}t}t|d�}|j�}|jd�x4|D],}|d|kr[|j|�q5t}q5W|j�|j�|S(s
    Delete line from file. Return True when line(s) have been deleted, False otherwise (specified line is not found)
    :param path: path to file
    :type path: string
    :param line: line to delete without EOL ('
')
    :type line: string
    :rtype bool
    sr+is%s
(tFalseRt	readlinestseektwriteRttruncatetclose(tpathtlinetfoundtftlinestl((s2/usr/lib/python2.7/site-packages/clcommon/utils.pytdelete_line_from_file#s	




(RRRtNoneRR,(((s2/usr/lib/python2.7/site-packages/clcommon/utils.pyt<module>s

Zerion Mini Shell 1.0