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
31f05781
Commit
31f05781
authored
Oct 20, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Open blob files in binary mode!
parent
dee9727e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/ZODB/blob.py
src/ZODB/blob.py
+1
-1
src/ZODB/tests/IteratorStorage.py
src/ZODB/tests/IteratorStorage.py
+1
-1
No files found.
src/ZODB/blob.py
View file @
31f05781
...
...
@@ -510,7 +510,7 @@ class BlobStorage(SpecificationDecoratorBase):
fd
,
name
=
tempfile
.
mkstemp
(
suffix
=
'.tmp'
,
dir
=
self
.
fshelper
.
temp_dir
)
os
.
close
(
fd
)
utils
.
cp
(
open
(
blobfilename
),
open
(
name
,
'wb'
))
utils
.
cp
(
open
(
blobfilename
,
'rb'
),
open
(
name
,
'wb'
))
self
.
restoreBlob
(
record
.
oid
,
record
.
tid
,
record
.
data
,
name
,
record
.
data_txn
,
trans
)
else
:
...
...
src/ZODB/tests/IteratorStorage.py
View file @
31f05781
...
...
@@ -224,7 +224,7 @@ class IteratorDeepCompare:
else
:
fn2
=
storage2
.
loadBlob
(
rec1
.
oid
,
rec1
.
tid
)
self
.
assert_
(
fn1
!=
fn2
)
eq
(
open
(
fn1
).
read
(),
open
(
fn2
).
read
())
eq
(
open
(
fn1
,
'rb'
).
read
(),
open
(
fn2
,
'rb'
).
read
())
# Make sure there are no more records left in rec1 and rec2,
# meaning they were the same length.
...
...
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