dosyayı silmeden önce var olup olmadığına bakmak lazımdır.

This commit is contained in:
Barış Metin
2005-06-20 12:32:48 +00:00
parent cd498e08c4
commit 1e7576a301
+4 -2
View File
@@ -58,7 +58,9 @@ def remove(pkg):
def purge(pkg): def purge(pkg):
if d.has_key(pkg): if d.has_key(pkg):
(status, version, release) = d[pkg] (status, version, release) = d[pkg]
os.unlink(files_name(pkg, version, release)) f = files_name(pkg, version, release)
del d[pkg] if util.check_file(f):
os.unlink(f)
del d[pkg]