diff options
| author | bwarsaw | 1998-11-04 23:40:00 +0000 |
|---|---|---|
| committer | bwarsaw | 1998-11-04 23:40:00 +0000 |
| commit | 5d51581d62d479fc2c80d15b1aeb782574b49cf2 (patch) | |
| tree | 0ffdb1a187af73a73e7f23797c9fb304c7d3bb7f | |
| parent | 17d99ad13fa416bcb3ff984fd711859d61752942 (diff) | |
| download | mailman-5d51581d62d479fc2c80d15b1aeb782574b49cf2.tar.gz mailman-5d51581d62d479fc2c80d15b1aeb782574b49cf2.tar.zst mailman-5d51581d62d479fc2c80d15b1aeb782574b49cf2.zip | |
remove_it(): better status messages
| -rwxr-xr-x | bin/rmlist | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/rmlist b/bin/rmlist index 269d28bdf..7934be0c7 100755 --- a/bin/rmlist +++ b/bin/rmlist @@ -39,7 +39,10 @@ except IndexError: def remove_it(dir, msg): - if os.path.exists(dir): + if os.path.islink(dir): + print 'Removing', msg + os.unlink(dir) + elif os.path.exists(dir): print 'Removing', msg os.system('rm -rf ' + dir) else: @@ -49,11 +52,12 @@ REMOVABLES = [('lists/%s', 'list info'), ] if removeArchives: - REMOVABLES = REMOVABLES + [('archives/private/%s', 'archives'), - ('archives/private/%s.mbox', 'archives'), - ('archives/public/%s', 'archives'), - ('archives/public/%s.mbox', 'archives'), - ] + REMOVABLES = REMOVABLES + \ + [('archives/private/%s', 'private archives'), + ('archives/private/%s.mbox', 'private archives'), + ('archives/public/%s', 'public archives'), + ('archives/public/%s.mbox', 'public archives'), + ] REMOVABLES.append(('locks/%s.lock', 'lock file')) |
