From 87b6a208f6120e3dbb20056aced47d81b4009b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Mon, 19 Dec 2005 00:22:32 +0000 Subject: [PATCH] * fix: delete file only if there is one --- pisi/files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pisi/files.py b/pisi/files.py index 321f0f26..00b0f73e 100644 --- a/pisi/files.py +++ b/pisi/files.py @@ -62,7 +62,8 @@ class FilesDB(shelve.LockedDBShelf): def remove_files(self, files, txn = None): def proc(txn): for x in files.list: - self.delete(str(x.path), txn) + if self.has_key(x.path): + self.delete(x.path, txn) self.txn_proc(proc, txn) def has_file(self, path, txn = None):