diff --git a/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java b/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java index b8e19beb..b514e913 100644 --- a/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java +++ b/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java @@ -164,17 +164,17 @@ public CAstNode visitImportFrom(ImportFrom importFrom) throws Exception { LOGGER.finer("Module name from " + importFrom + " is: " + moduleName + "."); - if (isLocalModule(moduleName)) { + if (localModule) { List pythonPath = PythonModuleParser.this.getPythonPath(); // If there is a PYTHONPATH specified. if (pythonPath != null && !pythonPath.isEmpty()) { // Adjust the module name per the PYTHONPATH. - Optional localModule = getLocalModule(moduleName); + Optional module = getLocalModule(moduleName); for (File pathEntry : pythonPath) { Path modulePath = - localModule + module .map(SourceModule::getURL) .map(URL::getFile) .map(Path::of)