[New-bugs-announce] [issue34248] dbm errors should contain file names

sds report at bugs.python.org
Fri Jul 27 09:33:58 EDT 2018


New submission from sds <sds at gnu.org>:

`dbm` errors should contain file names when appropriate, just like `OSError`.
E.g.:
```
>>> open("fooooo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'fooooo'
>>> import dbm.gnu
>>> dbm.gnu.open("fooooo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_gdbm.error: [Errno 2] No such file or directory
```
the `_gdbm.error` should report the file name `'fooooo'` just like `FileNotFoundError` does (and `exn.args` should contain the file name too!)

----------
components: Extension Modules
messages: 322492
nosy: sam-s
priority: normal
severity: normal
status: open
title: dbm errors should contain file names
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34248>
_______________________________________


More information about the New-bugs-announce mailing list