mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Fix ModuleVariableNode.toString
In some cases mod.getName() does not have a result, so toString of ModuleVariableNode would also not have a result, which would cause data-flow paths that use these as an edge to not be valid :O
This commit is contained in:
@@ -407,7 +407,7 @@ class ModuleVariableNode extends Node, TModuleVariableNode {
|
||||
override Scope getScope() { result = mod }
|
||||
|
||||
override string toString() {
|
||||
result = "ModuleVariableNode for " + mod.getName() + "." + var.getId()
|
||||
result = "ModuleVariableNode in " + mod.toString() + " for " + var.getId()
|
||||
}
|
||||
|
||||
/** Gets the module in which this variable appears. */
|
||||
|
||||
Reference in New Issue
Block a user