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 d4ed766 commit b681275Copy full SHA for b681275
Modules/main.c
@@ -305,11 +305,8 @@ pymain_start_pyrepl(void)
305
res = pymain_exit_err_print();
306
goto done;
307
}
308
- if (!PyDict_SetItemString(kwargs, "pythonstartup", _PyLong_GetOne())) {
309
- if (PyDict_SetItemString(kwargs, "mainmodule", main_module) < 0) {
310
- res = pymain_exit_err_print();
311
- goto done;
312
- }
+ if (!PyDict_SetItemString(kwargs, "mainmodule", main_module)
+ && !PyDict_SetItemString(kwargs, "pythonstartup", _PyLong_GetOne())) {
313
console_result = PyObject_Call(console, empty_tuple, kwargs);
314
if (console_result == NULL) {
315
0 commit comments