This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Improve error message on dbm.open
Type: Stage: resolved
Components: Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, corona10, rougeth
Priority: normal Keywords:

Created on 2019-03-08 10:06 by rougeth, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12060 merged rougeth, 2019-03-08 10:06
Messages (3)
msg337462 - (view) Author: Marco Rougeth (rougeth) * Date: 2019-03-08 10:06
If dbm.open is used with the flags 'r' or 'w' (read-only) to open a file that doesn't exist, it raises an exception with the message "need 'c' or 'n' flag to open new db". It'd be better to have a more explicit error message like "db file doesn't exist, use 'c' or 'n' flag to open new db".
msg341126 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2019-04-29 23:23
New changeset 81c5a905951aaf46f292eb459c32649c0b74ef61 by Brett Cannon (Marco Rougeth) in branch 'master':
bpo-36232: Improve error message on dbm.open() when the db doesn't exist (GH-12060)
https://github.com/python/cpython/commit/81c5a905951aaf46f292eb459c32649c0b74ef61
msg353104 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2019-09-24 17:31
I think that this issue solved. Can we close this issue?
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80413
2019-09-25 09:06:18rougethsetstatus: open -> closed
stage: resolved
2019-09-24 17:31:13corona10setnosy: + corona10
messages: + msg353104
2019-04-29 23:23:31brett.cannonsetnosy: + brett.cannon
messages: + msg341126
2019-03-08 10:06:52rougethcreate