o id`@s0ddlZddlZddlmZGdddeZdS)N)RemoteTransportc@sHeZdZdZdZddZddZeddZd d Z d d Z d dZ 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. local_nodecCdSNT)selfpasswordrr@/usr/lib/python3/dist-packages/sos/collector/transports/local.py_connectzLocalTransport._connectcCrrrrrrr _disconnectr zLocalTransport._disconnectcCrrrr rrr connected szLocalTransport.connectedcCs"|d||ft||dS)NzMoving %s to %sT) log_debugshutilcopy)rfnamedestrrr _retrieve_file$s zLocalTransport._retrieve_filecCs|S)Nr)rcmdrrr _format_cmd_for_exec)r z#LocalTransport._format_cmd_for_execcCsPtj|rt|d }|WdS1swY|d|dS)NrzNo such file: %s)ospathexistsopenreadr)rrrfilerrr _read_file,s   zLocalTransport._read_fileN) __name__ __module__ __qualname____doc__namer rpropertyrrrr rrrr rs  r)rrsos.collector.transportsrrrrrr s