◐ Shell
clean mode source ↗

bpo-34170: Cleanup pymain_run_filename() by vstinner · Pull Request #8631 · python/cpython

@vstinner

  • Inline pymain_run_file() and pymain_open_filename() into
    pymain_run_filename()
  • Created pymain_run_stdin() which is pymain_run_filename() with
    filename=NULL
  • Rename pymain_run_filename() to pymain_run_file()

https://bugs.python.org/issue34170

* Inline pymain_run_file() and pymain_open_filename() into
  pymain_run_filename()
* Created pymain_run_stdin() which is pymain_run_filename() with
  filename=NULL
* Rename pymain_run_filename() to pymain_run_file()

ZackerySpytz

PyErr_SetFromErrnoWithFilename(PyExc_OSError,
startup);
PyErr_Print();
PyErr_Clear();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to call PyErr_Clear() after PyErr_Print().

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is 11 years old, I didn't touch it. Please open a new issue if you want to fix it.

See commit e69a08e.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed in 8b58468.