diff options
author | Filipe Laíns <lains@riseup.net> | 2021-10-28 21:20:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 22:20:07 +0200 |
commit | 233841ab782953510ad308dc6173072a6cc6a1cd (patch) | |
tree | 0a0f557c21e72c1293747ce2e04a5bce7e45fa5b /Python/import.c | |
parent | 7401694807fc6b5f7b35ff73c06f4bb852e02946 (diff) | |
download | cpython-git-233841ab782953510ad308dc6173072a6cc6a1cd.tar.gz |
bpo-45379: add custom error string for FROZEN_DISABLED (GH-29190)
Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Gareth Rees <gdr@garethrees.org>
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index fe4686cd56..15b1956c10 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1153,9 +1153,11 @@ set_frozen_error(frozen_status status, PyObject *modname) switch (status) { case FROZEN_BAD_NAME: case FROZEN_NOT_FOUND: - case FROZEN_DISABLED: err = "No such frozen object named %R"; break; + case FROZEN_DISABLED: + err = "Frozen modules are disabled and the frozen object named %R is not essential"; + break; case FROZEN_EXCLUDED: err = "Excluded frozen object named %R"; break; |