Skip to content

Commit f3538ed

Browse files
committed
raise error if classs can't be found in PUnpickler.loadInst
1 parent f9b2f31 commit f3538ed

File tree

1 file changed

+2
-5
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/pickle

1 file changed

+2
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/pickle/PUnpickler.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,11 +1223,8 @@ private void loadInst(VirtualFrame frame, PythonContext ctx, PUnpickler self) {
12231223
if (s.length < 2) {
12241224
throw badReadLine();
12251225
}
1226-
try {
1227-
Object className = decodeASCII(frame, s, s.length - 1, T_ERRORS_STRICT);
1228-
cls = findClass(frame, ctx.getCore(), self, moduleName, className);
1229-
} catch (PException ignored) {
1230-
}
1226+
Object className = decodeASCII(frame, s, s.length - 1, T_ERRORS_STRICT);
1227+
cls = findClass(frame, ctx.getCore(), self, moduleName, className);
12311228
}
12321229

12331230
assert cls != null;

0 commit comments

Comments
 (0)