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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
a310c065
Commit
a310c065
authored
Jun 10, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed rename_or_copy, which was used soley by blobs.
parent
ee46794c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
17 deletions
+0
-17
src/ZODB/utils.py
src/ZODB/utils.py
+0
-17
No files found.
src/ZODB/utils.py
View file @
a310c065
...
...
@@ -12,7 +12,6 @@
#
##############################################################################
import
exceptions
import
sys
import
time
import
struct
...
...
@@ -114,22 +113,6 @@ def cp(f1, f2, length=None):
write
(
data
)
length
-=
len
(
data
)
def
rename_or_copy
(
f1
,
f2
):
"""Try to rename f1 to f2, fallback to copy.
Under certain conditions a rename might not work, e.g. because the target
directory is on a different partition. In this case we try to copy the
data and remove the old file afterwards.
"""
try
:
os
.
rename
(
f1
,
f2
)
except
exceptions
.
OSError
:
cp
(
open
(
f1
,
'rb'
),
open
(
f2
,
'wb'
))
os
.
unlink
(
f1
)
def
newTimeStamp
(
old
=
None
,
TimeStamp
=
TimeStamp
,
time
=
time
.
time
,
gmtime
=
time
.
gmtime
):
...
...
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