Make sure that single commands still work
This commit is contained in:
parent
9e1cd10c99
commit
cc7af4b1a4
1 changed files with 8 additions and 8 deletions
|
|
@ -541,23 +541,23 @@ class DebugSession( object ):
|
||||||
elif commands is not None:
|
elif commands is not None:
|
||||||
raise ValueError( "Invalid commands; must be list" )
|
raise ValueError( "Invalid commands; must be list" )
|
||||||
|
|
||||||
commands = remote[ pfx + 'Command' ]
|
command = remote[ pfx + 'Command' ]
|
||||||
|
|
||||||
if isinstance( commands, str ):
|
if isinstance( command, str ):
|
||||||
commands = shlex.split( commands )
|
command = shlex.split( command )
|
||||||
|
|
||||||
if not isinstance( commands, list ):
|
if not isinstance( command, list ):
|
||||||
raise ValueError( "Invalid command; must be list/string" )
|
raise ValueError( "Invalid command; must be list/string" )
|
||||||
|
|
||||||
if not commands:
|
if not command:
|
||||||
raise ValueError( 'Could not determine commands for ' + pfx )
|
raise ValueError( 'Could not determine commands for ' + pfx )
|
||||||
|
|
||||||
return commands
|
return [ command ]
|
||||||
|
|
||||||
def _Initialise( self ):
|
def _Initialise( self ):
|
||||||
def handle_initialize_response( msg ):
|
def handle_initialize_response( msg ):
|
||||||
self._server_capabilities = msg.get( 'body' ) or {}
|
self._server_capabilities = msg.get( 'body' ) or {}
|
||||||
self._Launch()
|
self._Launch()
|
||||||
|
|
||||||
self._connection.DoRequest( handle_initialize_response, {
|
self._connection.DoRequest( handle_initialize_response, {
|
||||||
'command': 'initialize',
|
'command': 'initialize',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue