diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-22 21:45:20 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-22 21:45:20 (GMT) |
commit | a65e94c1bf30259e0367d136054328c107ff41da (patch) | |
tree | 3e52a58cdad9ac85144590d72641e2f065d7382e /Lib/bsddb/__init__.py | |
parent | 865ea892018f4ff823496b2d0636c47c7ef06231 (diff) | |
download | cpython-a65e94c1bf30259e0367d136054328c107ff41da.zip cpython-a65e94c1bf30259e0367d136054328c107ff41da.tar.gz cpython-a65e94c1bf30259e0367d136054328c107ff41da.tar.bz2 |
Convert raise statements in bsddb.
Diffstat (limited to 'Lib/bsddb/__init__.py')
-rw-r--r-- | Lib/bsddb/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index dfa77fd..f16db19 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -199,7 +199,7 @@ class _DBWithCursor(_iter_mixin): def _checkOpen(self): if self.db is None: - raise error, "BSDDB object has already been closed" + raise error("BSDDB object has already been closed") def isOpen(self): return self.db is not None @@ -483,7 +483,7 @@ def _openDBEnv(cachesize): if cachesize >= 20480: e.set_cachesize(0, cachesize) else: - raise error, "cachesize must be >= 20480" + raise error("cachesize must be >= 20480") e.set_lk_detect(db.DB_LOCK_DEFAULT) e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK | db.DB_INIT_MPOOL) return e @@ -505,7 +505,7 @@ def _checkflag(flag, file): if file is not None and os.path.isfile(file): os.unlink(file) else: - raise error, "flags should be one of 'r', 'w', 'c' or 'n', not "+repr(flag) + raise error("flags should be one of 'r', 'w', 'c' or 'n', not "+repr(flag)) return flags | db.DB_THREAD #---------------------------------------------------------------------- |