mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Added check to make sure logs/* were normal files.
This commit is contained in:
parent
10a0fe9f93
commit
3f3d26d635
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user