Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b681275

Browse filesBrowse files
committed
Refactoring Modules/main.c
1 parent d4ed766 commit b681275
Copy full SHA for b681275

File tree

Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed

‎Modules/main.c

Copy file name to clipboardExpand all lines: Modules/main.c
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,8 @@ pymain_start_pyrepl(void)
305305
res = pymain_exit_err_print();
306306
goto done;
307307
}
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-
}
308+
if (!PyDict_SetItemString(kwargs, "mainmodule", main_module)
309+
&& !PyDict_SetItemString(kwargs, "pythonstartup", _PyLong_GetOne())) {
313310
console_result = PyObject_Call(console, empty_tuple, kwargs);
314311
if (console_result == NULL) {
315312
res = pymain_exit_err_print();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.