/usr/lib/python2.6/site-packages/clcommon
Edit: /usr/lib/python2.6/site-packages/clcommon/utils.pyo (2151B)
Ñò
\=0Yc @ s; d d k Z d e f d „ ƒ YZ d d „ Z d „ Z d S( iÿÿÿÿNt ExternalProgramFailedc B s e Z d „ Z RS( c C s t i | | ƒ d S( N( t Exceptiont __init__( t selft message( ( s2 /usr/lib/python2.6/site-packages/clcommon/utils.pyR s ( t __name__t
__module__R ( ( ( s2 /usr/lib/python2.6/site-packages/clcommon/utils.pyR s c C sÇ d i | ƒ } y= t i | d t d ƒ d t i d t i d t d | ƒ} Wn1 t j
o% } t d | t | ƒ f ƒ ‚ n X| i
ƒ \ } } | i d j o! t | p d
| | f ƒ ‚ n | S( sv
Runs external process and returns output
@param cmd: command and arguments as a list
@return: string
t t stdins /dev/nullt stdoutt stderrt close_fdst envs %s. Can not run command: %si s output of the command: %s
%s( t joint
subprocesst Popent opent PIPEt STDOUTt Truet OSErrorR t strt communicatet
returncode( t cmdt env_datat cmd_linet outputt oserrt std_outt std_err( ( s2 /usr/lib/python2.6/site-packages/clcommon/utils.pyt run_command s
!!c C s t } t | d ƒ } | i ƒ } | i d ƒ x6 | D]. } | d | j o | i | ƒ q5 t } q5 W| i ƒ | i ƒ | 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
s r+i s %s
( t FalseR t readlinest seekt writeR t truncatet close( t patht linet foundt ft linest l( ( s2 /usr/lib/python2.6/site-packages/clcommon/utils.pyt delete_line_from_file# s
( R R R t NoneR R, ( ( ( s2 /usr/lib/python2.6/site-packages/clcommon/utils.pyt
s