Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
bd50a59f
Commit
bd50a59f
authored
Feb 28, 2013
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More ResourceWarnings fixes
parent
290b0734
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/ZODB/FileStorage/FileStorage.py
src/ZODB/FileStorage/FileStorage.py
+3
-4
src/ZODB/tests/IExternalGC.test
src/ZODB/tests/IExternalGC.test
+1
-1
No files found.
src/ZODB/FileStorage/FileStorage.py
View file @
bd50a59f
...
@@ -962,10 +962,9 @@ class FileStorage(
...
@@ -962,10 +962,9 @@ class FileStorage(
# We're undoing a blob modification operation.
# We're undoing a blob modification operation.
# We have to copy the blob data
# We have to copy the blob data
tmp
=
ZODB
.
utils
.
mktemp
(
dir
=
self
.
fshelper
.
temp_dir
)
tmp
=
ZODB
.
utils
.
mktemp
(
dir
=
self
.
fshelper
.
temp_dir
)
with
open
(
tmp
,
'wb'
)
as
fp
:
with
self
.
openCommittedBlobFile
(
h
.
oid
,
userial
)
as
sfp
:
ZODB
.
utils
.
cp
(
with
open
(
tmp
,
'wb'
)
as
dfp
:
self
.
openCommittedBlobFile
(
h
.
oid
,
userial
),
ZODB
.
utils
.
cp
(
sfp
,
dfp
)
fp
)
self
.
_blob_storeblob
(
h
.
oid
,
self
.
_tid
,
tmp
)
self
.
_blob_storeblob
(
h
.
oid
,
self
.
_tid
,
tmp
)
new
=
DataHeader
(
h
.
oid
,
self
.
_tid
,
ipos
,
otloc
,
0
,
len
(
p
))
new
=
DataHeader
(
h
.
oid
,
self
.
_tid
,
ipos
,
otloc
,
0
,
len
(
p
))
...
...
src/ZODB/tests/IExternalGC.test
View file @
bd50a59f
...
@@ -68,7 +68,7 @@ We can still get the data if we load before the time we deleted.
...
@@ -68,7 +68,7 @@ We can still get the data if we load before the time we deleted.
True
True
>>> storage.loadBefore(oid1, conn.root()._p_serial) == (p1, s1, tid)
>>> storage.loadBefore(oid1, conn.root()._p_serial) == (p1, s1, tid)
True
True
>>>
open(storage.loadBlob(oid1, s1))
.read()
>>>
with open(storage.loadBlob(oid1, s1)) as fp: fp
.read()
'
some
data
'
'
some
data
'
If we pack, however, the old data will be removed and the data will be
If we pack, however, the old data will be removed and the data will be
...
...
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