Convert raise statements in bsddb.

This commit is contained in:
Collin Winter 2007-08-22 21:45:20 +00:00
parent 865ea89201
commit a65e94c1bf
9 changed files with 33 additions and 33 deletions

View file

@ -69,7 +69,7 @@ def open(filename, flags=db.DB_CREATE, mode=0o660, filetype=db.DB_HASH,
elif sflag == 'n':
flags = db.DB_TRUNCATE | db.DB_CREATE
else:
raise db.DBError, "flags should be one of 'r', 'w', 'c' or 'n' or use the bsddb.db.DB_* flags"
raise db.DBError("flags should be one of 'r', 'w', 'c' or 'n' or use the bsddb.db.DB_* flags")
d = DBShelf(dbenv)
d.open(filename, dbname, filetype, flags, mode)
@ -155,7 +155,7 @@ class DBShelf(DictMixin):
if self.get_type() != db.DB_RECNO:
self.append = self.__append
return self.append(value, txn=txn)
raise db.DBError, "append() only supported when dbshelve opened with filetype=dbshelve.db.DB_RECNO"
raise db.DBError("append() only supported when dbshelve opened with filetype=dbshelve.db.DB_RECNO")
def associate(self, secondaryDB, callback, flags=0):