this clean lock thing is totally useless and unnecessary stuff...
But lets carry the command till the db changes after the release... It was and still useless but anyway, lets fix the command to do its job.
This commit is contained in:
@@ -309,10 +309,8 @@ This command deletes unused locks from the database directory."""
|
||||
|
||||
def run(self):
|
||||
self.init()
|
||||
pisi.util.clean_locks()
|
||||
self.finalize()
|
||||
|
||||
|
||||
class DeleteCache(Command):
|
||||
"""Delete cache files
|
||||
|
||||
|
||||
@@ -587,14 +587,6 @@ def partition_freespace(directory):
|
||||
st = os.statvfs(directory)
|
||||
return st[statvfs.F_BSIZE] * st[statvfs.F_BFREE]
|
||||
|
||||
def clean_locks(top = '.'):
|
||||
for root, dirs, files in os.walk(top):
|
||||
for fn in files:
|
||||
if fn.endswith('.lock'):
|
||||
path = join_path(root, fn)
|
||||
ctx.ui.info(_('Removing lock %s'), path)
|
||||
os.unlink(path)
|
||||
|
||||
########################################
|
||||
# Package/Repository Related Functions #
|
||||
########################################
|
||||
|
||||
Reference in New Issue
Block a user