mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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>
This commit is contained in:
parent
7401694807
commit
233841ab78
2 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue