commit | f4375ef4d458bf24610ffef591f8197a3dbf0b35 | [log] [tgz] |
---|---|---|
author | Brett Cannon <brett@python.org> | Sun Jun 16 18:05:54 2013 -0400 |
committer | Brett Cannon <brett@python.org> | Sun Jun 16 18:05:54 2013 -0400 |
tree | 5ee2029fa137cf28d55afc5324caa9e57b209ac0 | |
parent | 01b0475b08ab694e2eb0610d03b629afe22bb2a1 [diff] |
importlib.abc.SourceLoader.get_source() was re-raising SyntaxError and UnicodeDecodeError as ImportError. That was over-reaching the point of raising ImportError in get_source() (which is to signal the source code was not found when it should have). Conflating the two exceptions with ImportError could lead to masking errors with the source which should be known outside of whether there was an error simply getting the source to begin with.