relint
This commit is contained in:
parent
5e64b07e8d
commit
cd1b304d30
1 changed files with 15 additions and 15 deletions
|
|
@ -696,27 +696,27 @@ class DebugSession( object ):
|
||||||
|
|
||||||
def _GetDockerCommand( self, remote ):
|
def _GetDockerCommand( self, remote ):
|
||||||
if 'container' not in remote:
|
if 'container' not in remote:
|
||||||
raise ValueError( 'Invalid container; must be string' )
|
raise ValueError( 'Invalid container; must be string' )
|
||||||
|
|
||||||
docker = [ 'docker exec' ]
|
docker = [ 'docker exec' ]
|
||||||
docker.append( remote[ 'container' ] )
|
docker.append( remote[ 'container' ] )
|
||||||
return docker
|
return docker
|
||||||
|
|
||||||
def _GetRemoteExecCommand( self, remote ):
|
def _GetRemoteExecCommand( self, remote ):
|
||||||
is_ssh_cmd = any(
|
is_ssh_cmd = any(
|
||||||
remote.get( 'ssh' ),
|
remote.get( 'ssh' ),
|
||||||
remote.get( 'account' ),
|
remote.get( 'account' ),
|
||||||
remote.get( 'host' ),
|
remote.get( 'host' ),
|
||||||
)
|
)
|
||||||
is_docker_cmd = any(
|
is_docker_cmd = any(
|
||||||
remote.get( 'docker' ),
|
remote.get( 'docker' ),
|
||||||
remote.get( 'container' ),
|
remote.get( 'container' ),
|
||||||
)
|
)
|
||||||
if is_ssh_cmd:
|
if is_ssh_cmd:
|
||||||
return self._GetSSHCommand( remote )
|
return self._GetSSHCommand( remote )
|
||||||
elif is_docker_cmd:
|
elif is_docker_cmd:
|
||||||
return self._GetDockerCommand( remote )
|
return self._GetDockerCommand( remote )
|
||||||
raise ValueError( 'Could not determine remote exec command' )
|
raise ValueError( 'Could not determine remote exec command' )
|
||||||
|
|
||||||
|
|
||||||
def _GetCommands( self, remote, pfx ):
|
def _GetCommands( self, remote, pfx ):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue