Skip to content

Commit 71335a1

Browse files
committed
python: update users of try
1 parent 7d05ba3 commit 71335a1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

python/ql/src/Expressions/HashedButNoHash.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ predicate is_unhashable(ControlFlowNode f, ClassValue cls, ControlFlowNode origi
7070
predicate typeerror_is_caught(ControlFlowNode f) {
7171
exists(Try try |
7272
try.getBody().contains(f.getNode()) and
73-
try.getAHandler().getType().pointsTo(ClassValue::typeError())
73+
try.getANormalHandler().getType().pointsTo(ClassValue::typeError())
7474
)
7575
}
7676

python/ql/src/Imports/DeprecatedModule.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ from ImportExpr imp, string name, string instead
7878
where
7979
name = imp.getName() and
8080
deprecated_module(name, instead, _, _) and
81-
not exists(Try try, ExceptStmt except | except = try.getAHandler() |
81+
not exists(Try try, ExceptStmt except | except = try.getANormalHandler() |
8282
except.getType().pointsTo(ClassValue::importError()) and
8383
except.containsInScope(imp)
8484
)

python/ql/src/Variables/UndefinedGlobal.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import semmle.python.pointsto.PointsTo
1717

1818
predicate guarded_against_name_error(Name u) {
1919
exists(Try t | t.getBody().getAnItem().contains(u) |
20-
t.getAHandler().getType().(Name).getId() = "NameError"
20+
t.getANormalHandler().getType().(Name).getId() = "NameError"
2121
)
2222
or
2323
exists(ConditionBlock guard, BasicBlock controlled, Call globals |

python/ql/src/Variables/UninitializedLocal.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ predicate uninitialized_local(NameNode use) {
2727
predicate explicitly_guarded(NameNode u) {
2828
exists(Try t |
2929
t.getBody().contains(u.getNode()) and
30-
t.getAHandler().getType().pointsTo(ClassValue::nameError())
30+
t.getANormalHandler().getType().pointsTo(ClassValue::nameError())
3131
)
3232
}
3333

0 commit comments

Comments
 (0)