Current File : //usr/lib/python3.6/site-packages/sos/collector/transports/__pycache__/local.cpython-36.pyc
3

\��h��@s0ddlZddlZddlmZGdd�de�ZdS)�N)�RemoteTransportc@sPeZdZdZdZdd�Zdd�Zedd��Zd	d
�Z	dd�Z
d
d�Zdd�ZdS)�LocalTransportz�
    A 'transport' to represent a local node. No remote connection is actually
    made, and all commands set to be run by this transport are executed locally
    without any wrappers.
    Z
local_nodecCsdS)NT�)�selfZpasswordrr�/usr/lib/python3.6/local.py�_connectszLocalTransport._connectcCsdS)NTr)rrrr�_disconnectszLocalTransport._disconnectcCsdS)NTr)rrrr�	connected szLocalTransport.connectedcCs&|jd|�d|���tj||�dS)NzMoving z to T)�	log_debug�shutil�copy)r�fname�destrrr�_retrieve_file$szLocalTransport._retrieve_filecCs|S)Nr)r�cmdrrr�_format_cmd_for_exec)sz#LocalTransport._format_cmd_for_execcCsdS)NTr)rr
rrrr�_copy_file_to_remote,sz#LocalTransport._copy_file_to_remotec
Cs>tjj|�r*t|ddd��
}|j�SQRX|jd|���dS)N�rzutf-8)�encodingzNo such file: �)�os�path�exists�open�readr
)rr
Zrfilerrr�
_read_file/s
zLocalTransport._read_fileN)
�__name__�
__module__�__qualname__�__doc__�namerr�propertyr	rrrrrrrrrsr)rrZsos.collector.transportsrrrrrr�<module>s