core: add helper for computing stats; use it in modules
This commit is contained in:
parent
a94b64c273
commit
1cc4eb5d8d
10 changed files with 79 additions and 3 deletions
|
@ -123,7 +123,8 @@ def _candidates() -> Iterable[str]:
|
|||
'.',
|
||||
*config.paths,
|
||||
], stdout=PIPE) as p:
|
||||
for line in p.stdout:
|
||||
out = p.stdout; assert out is not None
|
||||
for line in out:
|
||||
path = line.decode('utf8').rstrip('\n')
|
||||
mime = fastermime(path)
|
||||
tp = mime.split('/')[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue