File tree Expand file tree Collapse file tree
src/client/pythonEnvironments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export type InterpreterInformation = {
2626 * @param python - the path to the Python executable
2727 * @param raw - the information returned by the `interpreterInfo.py` script
2828 */
29- export function extractPythonEnvInfo ( python : string , raw : PythonEnvInfo ) : InterpreterInformation {
29+ function extractInterpreterInfo ( python : string , raw : PythonEnvInfo ) : InterpreterInformation {
3030 const rawVersion = `${ raw . versionInfo . slice ( 0 , 3 ) . join ( '.' ) } -${ raw . versionInfo [ 3 ] } ` ;
3131 const version = parseVersion ( rawVersion ) ;
3232 version . sysVersion = raw . sysVersion ;
@@ -89,5 +89,5 @@ export async function getInterpreterInfo(
8989 if ( logger ) {
9090 logger . info ( `Found interpreter for ${ argv } ` ) ;
9191 }
92- return extractPythonEnvInfo ( python . pythonExecutable , json ) ;
92+ return extractInterpreterInfo ( python . pythonExecutable , json ) ;
9393}
Original file line number Diff line number Diff line change 22// Licensed under the MIT License.
33
44import { injectable } from 'inversify' ;
5+ import { traceError } from '../../common/logger' ;
56import { createDeferred , Deferred } from '../../common/utils/async' ;
67import { createWorkerPool , IWorkerPool , QueuePosition } from '../../common/utils/workerPool' ;
78import { getInterpreterInfo , InterpreterInformation } from '../base/info/interpreter' ;
@@ -66,6 +67,10 @@ export class EnvironmentInfoService implements IEnvironmentInfoService {
6667 this . cache . delete ( interpreterPath ) ;
6768 }
6869 return r ;
70+ } ) . catch ( ( ex ) => {
71+ traceError ( 'Fetching interpreter information failed with error' , ex ) ;
72+ deferred . resolve ( undefined ) ;
73+ return undefined ;
6974 } ) ;
7075 }
7176}
You can’t perform that action at this time.
0 commit comments