Commit a310c065 authored by Jim Fulton's avatar Jim Fulton

Removed rename_or_copy, which was used soley by blobs.

parent ee46794c
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment