remove unused locking code. (trunk r7864)
svn path=/main/branches/2.1.2/; revision=7865
import tempfile
import portage_exception
import portage_exec
-import portage_locks
import commands
import md5, sha
global prelink_capable
myfilename = filename[:]
prelink_tmpfile = None
- mylock = None
try:
if calc_prelink and prelink_capable:
# Create non-prelinked temporary file to checksum.
if e.errno == errno.ENOENT:
raise portage_exception.FileNotFound(myfilename)
raise
+ return myhash, mysize
+ finally:
if prelink_tmpfile:
try:
os.unlink(prelink_tmpfile)
if e.errno != errno.ENOENT:
raise
del e
- return myhash, mysize
- finally:
- if mylock:
- portage_locks.unlockfile(mylock)
def perform_multiple_checksums(filename, hashes=["MD5"], calc_prelink=0):
"""