diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-12-03 01:23:10 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-12-03 01:23:10 (GMT) |
commit | 7e59ce8b07127fade6400ea5d66a12ef4ae68475 (patch) | |
tree | 73b26e556f0079520299a1555419e99625469785 /Python/future.c | |
parent | ab68fcaee3c39ad21cf3a62f6d299e79a2c1fd56 (diff) | |
download | cpython-7e59ce8b07127fade6400ea5d66a12ef4ae68475.zip cpython-7e59ce8b07127fade6400ea5d66a12ef4ae68475.tar.gz cpython-7e59ce8b07127fade6400ea5d66a12ef4ae68475.tar.bz2 |
Issue #14285: Do not catch ImportError from __init__.py in runpy
Initialize package before calling get_loader() for __main__, so that we do
not incorrectly handle ImportError from __init__.py. When runpy is used from
the Python CLI, use an internal exception rather than ImportError, to avoid
catching an unexpected ImportError.
Also simplify message formatting: str() is redundant with %s.
Also fix test_dash_m_error_code_is_one() in test_cmd_line_script, which was
failing because the test package was not in the current directlry, rather
the desired ValueError.
Diffstat (limited to 'Python/future.c')
0 files changed, 0 insertions, 0 deletions