diff options
author | Sylvain <syt@logilab.fr> | 2007-09-13 19:04:32 +0200 |
---|---|---|
committer | Sylvain <syt@logilab.fr> | 2007-09-13 19:04:32 +0200 |
commit | 32591b7cc09d16a2713d1695a0aa85c1e44aa19e (patch) | |
tree | b1c700a99510062466cc38decbe3feec55ccc5b5 /shellutils.py | |
parent | 370f6a92f77dbdc38134d7e41fb174006bfdb5b8 (diff) | |
download | logilab-common-32591b7cc09d16a2713d1695a0aa85c1e44aa19e.tar.gz |
imo this is the cause of strange disparition, need to check however
Diffstat (limited to 'shellutils.py')
-rw-r--r-- | shellutils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shellutils.py b/shellutils.py index a54c6e0..fb22358 100644 --- a/shellutils.py +++ b/shellutils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2003-2006 LOGILAB S.A. (Paris, FRANCE). +# Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # This program is free software; you can redistribute it and/or modify it under @@ -24,7 +24,7 @@ import shutil import sys import tempfile import time -from os.path import exists, isdir, basename, join, walk +from os.path import exists, isdir, islink, basename, join, walk from logilab.common import STD_BLACKLIST @@ -54,7 +54,9 @@ def rm(*files): """ for wfile in files: for filename in glob.glob(wfile): - if isdir(filename): + if islink(filename): + os.remove(filename) + elif isdir(filename): shutil.rmtree(filename) else: os.remove(filename) |