feeds: fix bug when mimetype matches nothing

master
pictuga 2020-04-06 18:53:07 +02:00
parent bfad6b7a4a
commit a09831415f
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ def parse(data, url=None, mimetype=None):
if mimetype is not None: if mimetype is not None:
parser_candidates = [x for x in parsers if mimetype in x.mimetype] parser_candidates = [x for x in parsers if mimetype in x.mimetype]
if mimetype is None or parser_candidates is None: if mimetype is None or len(parser_candidates) == 0:
parser_candidates = parsers parser_candidates = parsers
# 3) Look for working ruleset for given parser # 3) Look for working ruleset for given parser