summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb')
-rw-r--r--Lib/bsddb/__init__.py6
-rw-r--r--Lib/bsddb/dbshelve.py2
-rw-r--r--Lib/bsddb/dbtables.py6
-rw-r--r--Lib/bsddb/test/test_1413192.py2
-rw-r--r--Lib/bsddb/test/test_basics.py2
-rw-r--r--Lib/bsddb/test/test_env_close.py8
-rw-r--r--Lib/bsddb/test/test_sequence.py4
7 files changed, 15 insertions, 15 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py
index 3099bb3..02df499 100644
--- a/Lib/bsddb/__init__.py
+++ b/Lib/bsddb/__init__.py
@@ -294,7 +294,7 @@ class _DBWithCursor(_iter_mixin):
#----------------------------------------------------------------------
# Compatibility object factory functions
-def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None,
+def hashopen(file, flag='c', mode=0o666, pgsize=None, ffactor=None, nelem=None,
cachesize=None, lorder=None, hflags=0):
flags = _checkflag(flag, file)
@@ -310,7 +310,7 @@ def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None,
#----------------------------------------------------------------------
-def btopen(file, flag='c', mode=0666,
+def btopen(file, flag='c', mode=0o666,
btflags=0, cachesize=None, maxkeypage=None, minkeypage=None,
pgsize=None, lorder=None):
@@ -328,7 +328,7 @@ def btopen(file, flag='c', mode=0666,
#----------------------------------------------------------------------
-def rnopen(file, flag='c', mode=0666,
+def rnopen(file, flag='c', mode=0o666,
rnflags=0, cachesize=None, pgsize=None, lorder=None,
rlen=None, delim=None, source=None, pad=None):
diff --git a/Lib/bsddb/dbshelve.py b/Lib/bsddb/dbshelve.py
index 8530c9a..8eb7ed2 100644
--- a/Lib/bsddb/dbshelve.py
+++ b/Lib/bsddb/dbshelve.py
@@ -40,7 +40,7 @@ from . import db
#------------------------------------------------------------------------
-def open(filename, flags=db.DB_CREATE, mode=0660, filetype=db.DB_HASH,
+def open(filename, flags=db.DB_CREATE, mode=0o660, filetype=db.DB_HASH,
dbenv=None, dbname=None):
"""
A simple factory function for compatibility with the standard
diff --git a/Lib/bsddb/dbtables.py b/Lib/bsddb/dbtables.py
index efc6062..97ea6a7 100644
--- a/Lib/bsddb/dbtables.py
+++ b/Lib/bsddb/dbtables.py
@@ -38,7 +38,7 @@ except NameError:
class DBIncompleteError(Exception):
pass
-class TableDBError(StandardError):
+class TableDBError(Exception):
pass
class TableAlreadyExists(TableDBError):
pass
@@ -134,9 +134,9 @@ def contains_metastrings(s) :
class bsdTableDB :
- def __init__(self, filename, dbhome, create=0, truncate=0, mode=0600,
+ def __init__(self, filename, dbhome, create=0, truncate=0, mode=0o600,
recover=0, dbflags=0):
- """bsdTableDB(filename, dbhome, create=0, truncate=0, mode=0600)
+ """bsdTableDB(filename, dbhome, create=0, truncate=0, mode=0o600)
Open database name in the dbhome BerkeleyDB directory.
Use keyword arguments when calling this constructor.
diff --git a/Lib/bsddb/test/test_1413192.py b/Lib/bsddb/test/test_1413192.py
index 436f407..0a411dd 100644
--- a/Lib/bsddb/test/test_1413192.py
+++ b/Lib/bsddb/test/test_1413192.py
@@ -18,4 +18,4 @@ env.open(env_name, db.DB_CREATE | db.DB_INIT_TXN | db.DB_INIT_MPOOL)
the_txn = env.txn_begin()
map = db.DB(env)
-map.open('xxx.db', "p", db.DB_HASH, db.DB_CREATE, 0666, txn=the_txn)
+map.open('xxx.db', "p", db.DB_HASH, db.DB_CREATE, 0o666, txn=the_txn)
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py
index 381e2ff..13f8ded 100644
--- a/Lib/bsddb/test/test_basics.py
+++ b/Lib/bsddb/test/test_basics.py
@@ -44,7 +44,7 @@ class BasicTestCase(unittest.TestCase):
dbtype = db.DB_UNKNOWN # must be set in derived class
dbopenflags = 0
dbsetflags = 0
- dbmode = 0660
+ dbmode = 0o660
dbname = None
useEnv = 0
envflags = 0
diff --git a/Lib/bsddb/test/test_env_close.py b/Lib/bsddb/test/test_env_close.py
index 12e1037..1a6a804 100644
--- a/Lib/bsddb/test/test_env_close.py
+++ b/Lib/bsddb/test/test_env_close.py
@@ -50,10 +50,10 @@ class DBEnvClosedEarlyCrash(unittest.TestCase):
dbenv = db.DBEnv()
dbenv.open(self.homeDir,
db.DB_INIT_CDB| db.DB_CREATE |db.DB_THREAD|db.DB_INIT_MPOOL,
- 0666)
+ 0o666)
d = db.DB(dbenv)
- d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0666)
+ d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0o666)
try:
dbenv.close()
@@ -75,10 +75,10 @@ class DBEnvClosedEarlyCrash(unittest.TestCase):
dbenv = db.DBEnv()
dbenv.open(self.homeDir,
db.DB_INIT_CDB| db.DB_CREATE |db.DB_THREAD|db.DB_INIT_MPOOL,
- 0666)
+ 0o666)
d = db.DB(dbenv)
- d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0666)
+ d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0o666)
try:
dbenv.close()
diff --git a/Lib/bsddb/test/test_sequence.py b/Lib/bsddb/test/test_sequence.py
index 48631a3..350d926 100644
--- a/Lib/bsddb/test/test_sequence.py
+++ b/Lib/bsddb/test/test_sequence.py
@@ -26,9 +26,9 @@ class DBSequenceTest(unittest.TestCase):
tempfile.tempdir = None
self.dbenv = db.DBEnv()
- self.dbenv.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL, 0666)
+ self.dbenv.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL, 0o666)
self.d = db.DB(self.dbenv)
- self.d.open(self.filename, db.DB_BTREE, db.DB_CREATE, 0666)
+ self.d.open(self.filename, db.DB_BTREE, db.DB_CREATE, 0o666)
def tearDown(self):
if hasattr(self, 'seq'):