Thanks to visit codestin.com Credit goes to github.com
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 53ffdc5 commit adde86dCopy full SHA for adde86d
1 file changed
Modules/_pickle.c
@@ -5298,13 +5298,12 @@ load(UnpicklerObject *self)
5298
case STOP:
5299
break;
5300
5301
- case '\0':
5302
- PyErr_SetNone(PyExc_EOFError);
5303
- return NULL;
5304
-
5305
default:
5306
- PyErr_Format(UnpicklingError,
5307
- "invalid load key, '%c'.", s[0]);
+ if (s[0] == '\0')
+ PyErr_SetNone(PyExc_EOFError);
+ else
+ PyErr_Format(UnpicklingError,
+ "invalid load key, '%c'.", s[0]);
5308
return NULL;
5309
}
5310
0 commit comments