Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
9421c7d1
Commit
9421c7d1
authored
May 06, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed trailing whitespace.
parent
d2bbfea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/ZODB/DemoStorage.py
src/ZODB/DemoStorage.py
+6
-6
No files found.
src/ZODB/DemoStorage.py
View file @
9421c7d1
...
@@ -45,7 +45,7 @@ class DemoStorage(object):
...
@@ -45,7 +45,7 @@ class DemoStorage(object):
else
:
else
:
self
.
_temporary_base
=
False
self
.
_temporary_base
=
False
self
.
base
=
base
self
.
base
=
base
if
changes
is
None
:
if
changes
is
None
:
changes
=
ZODB
.
MappingStorage
.
MappingStorage
()
changes
=
ZODB
.
MappingStorage
.
MappingStorage
()
zope
.
interface
.
alsoProvides
(
self
,
ZODB
.
interfaces
.
IBlobStorage
)
zope
.
interface
.
alsoProvides
(
self
,
ZODB
.
interfaces
.
IBlobStorage
)
...
@@ -82,7 +82,7 @@ class DemoStorage(object):
...
@@ -82,7 +82,7 @@ class DemoStorage(object):
self
.
changes
=
ZODB
.
blob
.
BlobStorage
(
blob_dir
,
self
.
changes
)
self
.
changes
=
ZODB
.
blob
.
BlobStorage
(
blob_dir
,
self
.
changes
)
self
.
_copy_methods_from_changes
(
self
.
changes
)
self
.
_copy_methods_from_changes
(
self
.
changes
)
return
True
return
True
def
cleanup
(
self
):
def
cleanup
(
self
):
self
.
base
.
cleanup
()
self
.
base
.
cleanup
()
self
.
changes
.
cleanup
()
self
.
changes
.
cleanup
()
...
@@ -95,7 +95,7 @@ class DemoStorage(object):
...
@@ -95,7 +95,7 @@ class DemoStorage(object):
def
_copy_methods_from_changes
(
self
,
changes
):
def
_copy_methods_from_changes
(
self
,
changes
):
for
meth
in
(
for
meth
in
(
'_lock_acquire'
,
'_lock_release'
,
'_lock_acquire'
,
'_lock_release'
,
'getSize'
,
'history'
,
'isReadOnly'
,
'registerDB'
,
'getSize'
,
'history'
,
'isReadOnly'
,
'registerDB'
,
'sortKey'
,
'tpc_transaction'
,
'tpc_vote'
,
'sortKey'
,
'tpc_transaction'
,
'tpc_vote'
,
):
):
...
@@ -230,7 +230,7 @@ class DemoStorage(object):
...
@@ -230,7 +230,7 @@ class DemoStorage(object):
raise
TypeError
(
raise
TypeError
(
"Garbage collection isn't supported"
"Garbage collection isn't supported"
" when there is a base storage."
)
" when there is a base storage."
)
try
:
try
:
self
.
changes
.
pack
(
t
,
referencesf
,
gc
=
False
)
self
.
changes
.
pack
(
t
,
referencesf
,
gc
=
False
)
except
TypeError
,
v
:
except
TypeError
,
v
:
...
@@ -262,7 +262,7 @@ class DemoStorage(object):
...
@@ -262,7 +262,7 @@ class DemoStorage(object):
old
=
self
.
base
.
load
(
oid
,
''
)[
1
]
old
=
self
.
base
.
load
(
oid
,
''
)[
1
]
except
ZODB
.
POSException
.
POSKeyError
:
except
ZODB
.
POSException
.
POSKeyError
:
old
=
serial
old
=
serial
if
old
!=
serial
:
if
old
!=
serial
:
raise
ZODB
.
POSException
.
ConflictError
(
raise
ZODB
.
POSException
.
ConflictError
(
oid
=
oid
,
serials
=
(
old
,
serial
))
# XXX untested branch
oid
=
oid
,
serials
=
(
old
,
serial
))
# XXX untested branch
...
@@ -332,7 +332,7 @@ class DemoStorage(object):
...
@@ -332,7 +332,7 @@ class DemoStorage(object):
_temporary_blobdirs
=
{}
_temporary_blobdirs
=
{}
def
cleanup_temporary_blobdir
(
def
cleanup_temporary_blobdir
(
ref
,
ref
,
_temporary_blobdirs
=
_temporary_blobdirs
,
# Make sure it stays around
_temporary_blobdirs
=
_temporary_blobdirs
,
# Make sure it stays around
):
):
blob_dir
=
_temporary_blobdirs
.
pop
(
ref
,
None
)
blob_dir
=
_temporary_blobdirs
.
pop
(
ref
,
None
)
if
blob_dir
and
os
.
path
.
exists
(
blob_dir
):
if
blob_dir
and
os
.
path
.
exists
(
blob_dir
):
...
...
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