small cleanups

This commit is contained in:
boyska 2016-09-09 13:39:11 +02:00
parent 529029bd97
commit 2668d89ca2
No known key found for this signature in database
GPG key ID: 7395DCAE58289CA9
2 changed files with 2 additions and 5 deletions

View file

@ -8,11 +8,9 @@ import fnmatch
def scan_dir(dirname, extension=None):
if extension is None:
fnfilter = lambda fnames: fnames
else:
fnfilter = lambda fnames: fnmatch.filter(fnames, extension)
extension = '*'
for root, dirnames, filenames in os.walk(dirname):
for fname in fnfilter(filenames):
for fname in fnmatch.filter(filenames, extension):
yield os.path.join(root, fname)

View file

@ -1,5 +1,4 @@
from datetime import datetime
from pytimeparse.timeparse import timeparse
from flask_wtf import Form
from wtforms import StringField, DateTimeField, validators, \