Skip to content

Commit b09ab67

Browse files
committed
Python: Modernizes query
1 parent 02ae0fb commit b09ab67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/ql/src/Exceptions/IncorrectExceptOrder.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import python
1616

17-
predicate incorrect_except_order(ExceptStmt ex1, ClassObject cls1, ExceptStmt ex2, ClassObject cls2) {
17+
predicate incorrect_except_order(ExceptStmt ex1, ClassValue cls1, ExceptStmt ex2, ClassValue cls2) {
1818
exists(int i, int j, Try t |
1919
ex1 = t.getHandler(i) and
2020
ex2 = t.getHandler(j) and i < j and
@@ -24,11 +24,11 @@ predicate incorrect_except_order(ExceptStmt ex1, ClassObject cls1, ExceptStmt ex
2424
)
2525
}
2626

27-
ClassObject except_class(ExceptStmt ex) {
28-
ex.getType().refersTo(result)
27+
ClassValue except_class(ExceptStmt ex) {
28+
ex.getType().pointsTo(result)
2929
}
3030

31-
from ExceptStmt ex1, ClassObject cls1, ExceptStmt ex2, ClassObject cls2
31+
from ExceptStmt ex1, ClassValue cls1, ExceptStmt ex2, ClassValue cls2
3232
where incorrect_except_order(ex1, cls1, ex2, cls2)
3333
select ex2, "Except block for $@ is unreachable; the more general $@ for $@ will always be executed in preference.",
3434
cls2, cls2.getName(), ex1, "except block", cls1, cls1.getName()

0 commit comments

Comments
 (0)