From 8eb1e47f6ddf98269bbeab8947551008b226ae42 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Wed, 6 Dec 2006 08:11:11 +0000 Subject: [PATCH] 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. --- pisi/cli/commands.py | 2 -- pisi/util.py | 8 -------- 2 files changed, 10 deletions(-) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 549cb97d..12313069 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -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 diff --git a/pisi/util.py b/pisi/util.py index 34015b65..7a0d0ca7 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -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 # ########################################