If there's only one config, just use it

This commit is contained in:
Ben Jackson 2018-05-27 13:41:36 +01:00
commit dd17f3f6f6

View file

@ -96,8 +96,11 @@ class DebugSession( object ):
launch_config = json.load( f )
if not configuration:
configuration = utils.SelectFromList( 'Which launch configuration?',
list( launch_config.keys() ) )
if len( launch_config ) == 1:
configuration = next( iter( launch_config.keys() ) )
else:
configuration = utils.SelectFromList( 'Which launch configuration?',
list( launch_config.keys() ) )
if not configuration:
return