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
7948f050
Commit
7948f050
authored
Jun 10, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added logic to make sure open files don't get caught in exception
stack traces.
parent
b15f9568
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/ZODB/blob.py
src/ZODB/blob.py
+7
-1
No files found.
src/ZODB/blob.py
View file @
7948f050
...
...
@@ -623,7 +623,13 @@ def rename_or_copy_blob(f1, f2, chmod=True):
os
.
rename
(
f1
,
f2
)
except
OSError
:
copied
(
"Copied blob file %r to %r."
,
f1
,
f2
)
utils
.
cp
(
open
(
f1
,
'rb'
),
open
(
f2
,
'wb'
))
file1
=
open
(
f1
,
'rb'
)
file2
=
open
(
f2
,
'wb'
)
try
:
utils
.
cp
(
file1
,
file2
)
finally
:
file1
.
close
()
file2
.
close
()
os
.
unlink
(
f1
)
if
chmod
:
os
.
chmod
(
f2
,
stat
.
S_IREAD
)
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