New submission from Hagen Fürstenau <[EMAIL PROTECTED]>: Opening a dbm database which doesn't exist without a "c" or "n" flag results in this exception:
>>> import dbm >>> dbm.open("abc") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/MP.shadow/hagenf/local/src/py3k/Lib/dbm/__init__.py", line 79, in open raise error("need 'c' or 'n' flag to open new db") TypeError: 'tuple' object is not callable "error" is a tuple of dbm's own exception class and IOError, but this doesn't seem to make sense in the present code and Python 3.0. The attached patch fixes the problem and adds a test for the correct exception being raised. ---------- components: Library (Lib) files: dbm.patch keywords: patch messages: 73563 nosy: hagen severity: normal status: open title: Incorrect exception raising in dbm.open on non-existing DB type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file11555/dbm.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3929> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com