a >h@s0ddlZddlZddlmZGdddeZdS)N)RemoteTransportc@sPeZdZdZdZddZddZeddZd d Z d d Z d dZ ddZ 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_nodecCsdSNT)selfpasswordrrB/usr/lib/python3.9/site-packages/sos/collector/transports/local.py_connectszLocalTransport._connectcCsdSrrrrrr _disconnectszLocalTransport._disconnectcCsdSrrr rrr connected szLocalTransport.connectedcCs&|d|d|t||dS)NzMoving z to T) log_debugshutilcopyrfnamedestrrr_retrieve_file$s zLocalTransport._retrieve_filecCs|S)Nr)rcmdrrr_format_cmd_for_exec)sz#LocalTransport._format_cmd_for_execcCsdSrrrrrr_copy_file_to_remote,sz#LocalTransport._copy_file_to_remotecCsVtj|rBt|ddd}|WdS1s80Y|d|dS)Nrzutf-8)encodingzNo such file: )ospathexistsopenreadr )rrZrfilerrr _read_file/s  &zLocalTransport._read_fileN) __name__ __module__ __qualname____doc__namer r propertyr rrrrrrrrrs r)rrZsos.collector.transportsrrrrrr s