Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
handledObject
getOrigin
1 parent 787b80f commit 5d55db1Copy full SHA for 5d55db1
1 file changed
python/ql/src/semmle/python/types/Exceptions.qll
@@ -276,7 +276,7 @@ class ExceptFlowNode extends ControlFlowNode {
276
or
277
exists(TupleValue tup |
278
this.handledObject(tup, ClassValue::tuple(), _) |
279
- val = tup.getItem(_) and origin.pointsTo(val)
+ element_from_tuple(tup).pointsTo(val,origin)
280
)
281
282
}
@@ -317,6 +317,12 @@ private ControlFlowNode element_from_tuple_objectapi(Object tuple) {
317
318
319
320
+private ControlFlowNode element_from_tuple(Value tuple) {
321
+ exists(Tuple t |
322
+ t = tuple.getOrigin() and result = t.getAnElt().getAFlowNode()
323
+ )
324
+}
325
+
326
/** A Reraising node is the node at the end of a finally block (on the exceptional branch)
327
* that reraises the current exception.
328
*/
0 commit comments