Skip to content

Commit fee39ea

Browse files
committed
Merge pull request smurfix#49 from fgimian/master
Nasty little bug in Clean class which deletes **all** files in directory :)
2 parents 11472dd + e04deb2 commit fee39ea

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)