Added check to make sure logs/* were normal files.

This commit is contained in:
Jeremy Fincher 2003-04-02 08:00:57 +00:00
parent 10a0fe9f93
commit 3f3d26d635

View File

@ -11,7 +11,9 @@ def removeFiles(arg, dirname, names):
if __name__ == '__main__': if __name__ == '__main__':
for name in os.listdir('logs'): 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) os.path.walk(os.curdir, removeFiles, None)
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: