From 6b172f08a02e97cb4adec783bcb7a2984f10f10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 5 Jul 2005 20:48:45 +0000 Subject: [PATCH] =?UTF-8?q?shutil,=20biraz=20ak=C4=B1ll=C4=B1=20olsa...=20?= =?UTF-8?q?:)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pisi/util.py b/pisi/util.py index bf1a6093..1f6077c3 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -151,7 +151,8 @@ def clean_dir(path): # for name in dirs: # os.rmdir(os.path.join(root, name)) # don't reimplement the wheel - shutil.rmtree(path) + if os.path.exists(path): + shutil.rmtree(path) def dir_size(dir): """ calculate the size of files under a dir