Skip to content

Commit e04deb2

Browse files
author
Fotis Gimian
committed
Repaired Clean command to ensure that all files are not deleted when used
1 parent 11472dd commit e04deb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_script/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ class Clean(Command):
368368
def run(self):
369369
for dirpath, dirnames, filenames in os.walk('.'):
370370
for filename in filenames:
371-
if '.pyc' or '.pyo' in filename:
371+
if filename.endswith('.pyc') or filename.endswith('.pyo'):
372372
full_pathname = os.path.join(dirpath, filename)
373373
print 'Removing %s' % full_pathname
374374
os.remove(full_pathname)

0 commit comments

Comments
 (0)