Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18974)

Unified Diff: Modules/_gdbmmodule.c

Issue 34248: dbm errors should contain file names
Patch Set: Created 1 year, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
index 10560040e4..ceb744b99b 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -75,7 +75,7 @@ newdbmobject(const char *file, int flags, int mode)
errno = 0;
if ((dp->di_dbm = gdbm_open((char *)file, 0, flags, mode, NULL)) == 0) {
if (errno != 0)
- PyErr_SetFromErrno(DbmError);
+ PyErr_SetFromErrnoWithFilename(DbmError, file);
else
PyErr_SetString(DbmError, gdbm_strerror(gdbm_errno));
Py_DECREF(dp);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+