We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6665115 commit 22893f3Copy full SHA for 22893f3
Lib/pickle.py
@@ -1876,8 +1876,10 @@ def load_build(self):
1876
inst_dict[intern(k)] = v
1877
else:
1878
inst_dict[k] = v
1879
- if slotstate:
1880
- for k, v in slotstate.items():
+ if slotstate is not None:
+ if not isinstance(slotstate, dict):
1881
+ raise UnpicklingError("slot state is not a dictionary")
1882
+ for k, v in slotstate.items():
1883
setattr(inst, k, v)
1884
dispatch[BUILD[0]] = load_build
1885
0 commit comments