diff options
Diffstat (limited to 'Lib/dbm/dumb.py')
| -rw-r--r-- | Lib/dbm/dumb.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/dbm/dumb.py b/Lib/dbm/dumb.py index e5c17f5ae2..6cef72a49a 100644 --- a/Lib/dbm/dumb.py +++ b/Lib/dbm/dumb.py @@ -185,7 +185,7 @@ class _Database(collections.abc.MutableMapping): def __setitem__(self, key, val): if self._readonly: - raise ValueError('The database is opened for reading only') + raise error('The database is opened for reading only') if isinstance(key, str): key = key.encode('utf-8') elif not isinstance(key, (bytes, bytearray)): @@ -222,7 +222,7 @@ class _Database(collections.abc.MutableMapping): def __delitem__(self, key): if self._readonly: - raise ValueError('The database is opened for reading only') + raise error('The database is opened for reading only') if isinstance(key, str): key = key.encode('utf-8') self._verify_open() |
