feds: rename 'ruleset' into 'default_ruleset'

Better reflects its use
master
pictuga 2020-03-18 16:22:03 +01:00
parent 6ce616106b
commit 8e3d32f24c
1 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ def parse_rules(filename=None):
class ParserBase(object):
def __init__(self, data=None, rules=None, parent=None):
if rules is None:
rules = parse_rules()[self.ruleset] # FIXME
rules = parse_rules()[self.default_ruleset] # FIXME
self.rules = rules
@ -220,7 +220,7 @@ class ParserBase(object):
class ParserXML(ParserBase):
ruleset = 'rss'
default_ruleset = 'rss-channel'
mimetype = ['text/xml', 'application/xml', 'application/rss+xml',
'application/rdf+xml', 'application/atom+xml', 'application/xhtml+xml']
@ -378,7 +378,7 @@ def parse_time(value):
class ParserJSON(ParserBase):
ruleset = 'json'
default_ruleset = 'json'
mimetype = ['application/json', 'application/javascript', 'text/javascript']
def parse(self, raw):