remove unused locking code.
svn path=/main/trunk/; revision=7864
import tempfile
import portage.exception
import portage.process
-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):
"""