Skip to content

Commit 7b49c8e

Browse files
committed
Python: Fixes bug in modernization
1 parent 646bc29 commit 7b49c8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/ql/src/Exceptions/RaisingTuple.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
import python
1313

14-
from Raise r, AstNode origin
15-
where r.getException().pointsTo(_, ClassValue::tuple(), origin) and
14+
from Raise r, Value v, AstNode origin
15+
where r.getException().pointsTo(v, origin) and
16+
v.getClass() = ClassValue::tuple() and
1617
major_version() = 2 /* Raising a tuple is a type error in Python 3, so is handled by the IllegalRaise query. */
1718

1819
select r, "Raising $@ will result in the first element (recursively) being raised and all other elements being discarded.", origin, "a tuple"

0 commit comments

Comments
 (0)