Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
Zope
Commits
7038f9fd
Commit
7038f9fd
authored
23 years ago
by
Jeremy Hylton
Browse files
Options
Download
Email Patches
Plain Diff
Update TemporaryStorage to use new constructor for ConflictError
parent
2804e2ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
lib/python/Products/TemporaryFolder/TemporaryStorage.py
lib/python/Products/TemporaryFolder/TemporaryStorage.py
+7
-4
No files found.
lib/python/Products/TemporaryFolder/TemporaryStorage.py
View file @
7038f9fd
...
...
@@ -17,10 +17,10 @@ MappingStorage. Unlike MappingStorage, it needs not be packed to get rid of
non-cyclic garbage and it does rudimentary conflict resolution. This is a
ripoff of Jim's Packless bsddb3 storage.
$Id: TemporaryStorage.py,v 1.
7
2002/01/1
1 1
4:
5
3:
38 chrism
Exp $
$Id: TemporaryStorage.py,v 1.
8
2002/01/1
8 0
4:
2
3:
45 jeremy
Exp $
"""
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
from
zLOG
import
LOG
from
ZODB.referencesf
import
referencesf
...
...
@@ -105,7 +105,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
try
:
data
=
self
.
_conflict_cache
.
get
((
oid
,
serial
),
marker
)
if
data
is
marker
:
raise
POSException
.
ConflictError
,
(
oid
,
serial
)
# XXX Need 2 serialnos to pass them to ConflictError--
# the old and the new
raise
POSException
.
ConflictError
(
oid
=
oid
)
else
:
return
data
[
0
]
# data here is actually (data, t)
finally
:
...
...
@@ -125,7 +127,8 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
if
serial
!=
oserial
:
data
=
self
.
tryToResolveConflict
(
oid
,
oserial
,
serial
,
data
)
if
not
data
:
raise
POSException
.
ConflictError
,
(
serial
,
oserial
)
raise
POSException
.
ConflictError
(
oid
=
oid
,
serials
=
(
oserial
,
serial
))
else
:
oserial
=
serial
newserial
=
self
.
_serial
...
...
This diff is collapsed.
Click to expand it.
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