fix: use python's extsplit, not manual splicing

This commit is contained in:
F. Eugene Aumson
2018-10-12 16:00:45 -04:00
parent 2afa38c927
commit 55f9348d0a

View File

@@ -63,7 +63,8 @@ class CleanCommandExtension(clean):
# delete all .pyc files
for root, _, files in walk("."):
for file in files:
if file[-4:] == ".pyc":
(_, extension) = path.splitext(file)
if extension == '.pyc':
remove(path.join(root, file))