File tree 2 files changed +7
-2
lines changed
src/client/pythonEnvironments
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export type InterpreterInformation = {
26
26
* @param python - the path to the Python executable
27
27
* @param raw - the information returned by the `interpreterInfo.py` script
28
28
*/
29
- export function extractPythonEnvInfo ( python : string , raw : PythonEnvInfo ) : InterpreterInformation {
29
+ function extractInterpreterInfo ( python : string , raw : PythonEnvInfo ) : InterpreterInformation {
30
30
const rawVersion = `${ raw . versionInfo . slice ( 0 , 3 ) . join ( '.' ) } -${ raw . versionInfo [ 3 ] } ` ;
31
31
const version = parseVersion ( rawVersion ) ;
32
32
version . sysVersion = raw . sysVersion ;
@@ -89,5 +89,5 @@ export async function getInterpreterInfo(
89
89
if ( logger ) {
90
90
logger . info ( `Found interpreter for ${ argv } ` ) ;
91
91
}
92
- return extractPythonEnvInfo ( python . pythonExecutable , json ) ;
92
+ return extractInterpreterInfo ( python . pythonExecutable , json ) ;
93
93
}
Original file line number Diff line number Diff line change 2
2
// Licensed under the MIT License.
3
3
4
4
import { injectable } from 'inversify' ;
5
+ import { traceError } from '../../common/logger' ;
5
6
import { createDeferred , Deferred } from '../../common/utils/async' ;
6
7
import { createWorkerPool , IWorkerPool , QueuePosition } from '../../common/utils/workerPool' ;
7
8
import { getInterpreterInfo , InterpreterInformation } from '../base/info/interpreter' ;
@@ -66,6 +67,10 @@ export class EnvironmentInfoService implements IEnvironmentInfoService {
66
67
this . cache . delete ( interpreterPath ) ;
67
68
}
68
69
return r ;
70
+ } ) . catch ( ( ex ) => {
71
+ traceError ( 'Fetching interpreter information failed with error' , ex ) ;
72
+ deferred . resolve ( undefined ) ;
73
+ return undefined ;
69
74
} ) ;
70
75
}
71
76
}
You can’t perform that action at this time.
0 commit comments