Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
47f89f61
Commit
47f89f61
authored
Feb 10, 2001
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge in changes from PacklessBerkeley3Storage product.
parent
aa6a0112
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
lib/python/BDBStorage/base.py
lib/python/BDBStorage/base.py
+16
-5
No files found.
lib/python/BDBStorage/base.py
View file @
47f89f61
...
...
@@ -84,12 +84,20 @@
##############################################################################
""" Base module for BerkeleyStorage implementations """
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
from
ZODB.BaseStorage
import
BaseStorage
from
ZODB
import
POSException
from
bsddb3
import
db
import
os
,
tempfile
class
BerkeleyDBError
(
POSException
.
POSError
):
""" A BerkeleyDB exception occurred. This probably indicates that
there is a low memory condition, a tempfile space shortage, or
a space shortage in the directory which houses the BerkeleyDB log
files. Check available tempfile space, logfile space, and RAM and
restart the server process."""
class
Base
(
BaseStorage
):
def
__init__
(
self
,
name
=
''
,
env
=
0
,
prefix
=
"zodb_"
):
...
...
@@ -175,8 +183,11 @@ def envFromString(name):
except
:
raise
"Error creating BerkeleyDB environment dir: %s"
%
name
e
=
db
.
DbEnv
()
e
.
open
(
name
,
db
.
DB_CREATE
|
db
.
DB_RECOVER
|
db
.
DB_INIT_MPOOL
|
db
.
DB_INIT_LOCK
|
db
.
DB_INIT_TXN
)
try
:
e
.
open
(
name
,
db
.
DB_CREATE
|
db
.
DB_RECOVER
|
db
.
DB_INIT_MPOOL
|
db
.
DB_INIT_LOCK
|
db
.
DB_INIT_TXN
)
except
db
.
error
,
msg
:
raise
BerkeleyDBError
,
"%s (%s)"
%
(
BerkeleyDBError
.
__doc__
,
msg
)
return
e
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment