lint: logging was not lazy formatting
This commit is contained in:
parent
6756432ce0
commit
77be26ff35
5 changed files with 8 additions and 8 deletions
|
@ -17,7 +17,7 @@ def recent_choose(paths, howmany, minepoch):
|
|||
found_files = {}
|
||||
for path in paths:
|
||||
if not os.path.exists(path):
|
||||
logging.warn("Can't find requested path: %s" % path)
|
||||
logging.warn("Can't find requested path:,s" % path)
|
||||
continue
|
||||
if os.path.isfile(path):
|
||||
found_files[path] = get_mtime(path)
|
||||
|
|
|
@ -65,13 +65,13 @@ def generate(spec):
|
|||
env=env,
|
||||
cwd='/')
|
||||
except subprocess.CalledProcessError as exc:
|
||||
log.error("Error %d when running script %s" %
|
||||
(exc.returncode, spec['name']))
|
||||
log.error("Error %d when running script %s",
|
||||
exc.returncode, spec['name'])
|
||||
return []
|
||||
|
||||
out = out.decode('utf-8')
|
||||
out = [p for p in out.split('\n') if p]
|
||||
logging.debug('Script %s produced %d files' % (spec['name'], len(out)))
|
||||
logging.debug('Script %s produced %d files', spec['name'], len(out))
|
||||
return out
|
||||
generate.description = 'Generate audio through an external script. ' \
|
||||
'Experts only.'
|
||||
|
|
|
@ -15,7 +15,7 @@ def generate(spec):
|
|||
|
||||
for path in spec['paths']:
|
||||
if not os.path.exists(path):
|
||||
logging.warn("Can't find requested path: %s" % path)
|
||||
logging.warn("Can't find requested path: %s", path)
|
||||
continue
|
||||
tmp = mkstemp(suffix=os.path.splitext(path)[-1],
|
||||
prefix='audiogen-static-')
|
||||
|
|
|
@ -9,7 +9,7 @@ def get_one_entrypoint(group, kind):
|
|||
if not points:
|
||||
raise ValueError('cant find an entrypoint %s:%s' % (group, kind))
|
||||
if len(points) > 1:
|
||||
log.warning("Found more than one timeform for %s:%s" % (group, kind))
|
||||
log.warning("Found more than one timeform for %s:%s", group, kind)
|
||||
return points[0].load()
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class EasyDateTimeField(Field):
|
|||
self.data = datetime.strptime(date_str, fmt)
|
||||
return
|
||||
except ValueError:
|
||||
log.debug('Format `%s` not valid for `%s`' %
|
||||
(fmt, date_str))
|
||||
log.debug('Format `%s` not valid for `%s`',
|
||||
fmt, date_str)
|
||||
raise ValueError(self.gettext(
|
||||
'Not a valid datetime value <tt>{}</tt>').format(date_str))
|
||||
|
|
Loading…
Reference in a new issue