diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-09-25 22:27:43 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-09-25 22:27:43 (GMT) |
commit | b5cf301b8e7e23ed5fddc369d24c856e48e9b27b (patch) | |
tree | c9a7a91316d8e4a575ac8f380461954d9925b1dc /Lib/dbm/__init__.py | |
parent | 7de5f2997266befa489af273f35703f3828dca24 (diff) | |
download | cpython-b5cf301b8e7e23ed5fddc369d24c856e48e9b27b.zip cpython-b5cf301b8e7e23ed5fddc369d24c856e48e9b27b.tar.gz cpython-b5cf301b8e7e23ed5fddc369d24c856e48e9b27b.tar.bz2 |
#3929: dbm.open() would try to raise a tuple. This does not work anymore with python 3.0.
Reviewed by Georg Brandl.
Diffstat (limited to 'Lib/dbm/__init__.py')
-rw-r--r-- | Lib/dbm/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py index 2082e07..19a7072 100644 --- a/Lib/dbm/__init__.py +++ b/Lib/dbm/__init__.py @@ -76,13 +76,13 @@ def open(file, flag = 'r', mode = 0o666): # file doesn't exist and the new flag was used so use default type mod = _defaultmod else: - raise error("need 'c' or 'n' flag to open new db") + raise error[0]("need 'c' or 'n' flag to open new db") elif result == "": # db type cannot be determined - raise error("db type could not be determined") + raise error[0]("db type could not be determined") elif result not in _modules: - raise error("db type is {0}, but the module is not " - "available".format(result)) + raise error[0]("db type is {0}, but the module is not " + "available".format(result)) else: mod = _modules[result] return mod.open(file, flag, mode) |