small cleanups
This commit is contained in:
parent
529029bd97
commit
2668d89ca2
2 changed files with 2 additions and 5 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from datetime import datetime
|
||||
|
||||
from pytimeparse.timeparse import timeparse
|
||||
from flask_wtf import Form
|
||||
from wtforms import StringField, DateTimeField, validators, \
|
||||
|
|
Loading…
Reference in a new issue