<s> import os <EOL> import pwd <EOL> from st2common import log as logging <EOL> from st2common . models . system . action import RemoteAction <EOL> from st2common . util . shell import quote_unix <EOL> __all__ = [ <EOL> '<STR_LIT>' , <EOL> ] <EOL> LOG = logging . getLogger ( __name__ ) <EOL> LOGGED_USER_USERNAME = pwd . getpwuid ( os . getuid ( ) ) [ <NUM_LIT:0> ] <EOL> class ParamikoRemoteCommandAction ( RemoteAction ) : <EOL> def get_full_command_string ( self ) : <EOL> env_str = self . _get_env_vars_export_string ( ) <EOL> cwd = self . get_cwd ( ) <EOL> if self . sudo : <EOL> if env_str : <EOL> command = quote_unix ( '<STR_LIT>' % ( env_str , cwd , self . command ) ) <EOL> else : <EOL> command = quote_unix ( '<STR_LIT>' % ( cwd , self . command ) ) <EOL> command = '<STR_LIT>' % ( command ) <EOL> else : <EOL> if env_str : <EOL> command = '<STR_LIT>' % ( env_str , cwd , <EOL> self . command ) <EOL> else : <EOL> command = '<STR_LIT>' % ( cwd , self . command ) <EOL> LOG . debug ( '<STR_LIT>' , command ) <EOL> return command </s>
