diff --git a/scripts/clean.py b/scripts/clean.py index 3456aad60..0754218ae 100755 --- a/scripts/clean.py +++ b/scripts/clean.py @@ -11,7 +11,9 @@ def removeFiles(arg, dirname, names): if __name__ == '__main__': for name in os.listdir('logs'): - os.remove(os.path.join('logs', name)) + filename = os.path.join('logs', name) + if os.path.isfile(filename): + os.remove(filename) os.path.walk(os.curdir, removeFiles, None) # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: