Skip to content

Commit 2490656

Browse files
committed
[GR-59404] PUnpicler.loadInst should throw exception if a class can't be found.
PullRequest: graalpython/3538
2 parents 24e53f0 + f3538ed commit 2490656

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)