mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 02:03:37 +08:00
tools: pylint xml_helper.py
This commit is contained in:
parent
234909f9d6
commit
54a9070ce5
@ -3,14 +3,18 @@
|
||||
|
||||
from lxml import etree as tree
|
||||
|
||||
|
||||
class CustomResolver(tree.Resolver):
|
||||
def resolve(self, url, id, context):
|
||||
def resolve(self, url, _id, context):
|
||||
if 'custom-entities.ent' in url:
|
||||
return self.resolve_filename('man/custom-entities.ent', context)
|
||||
if 'ethtool-link-mode' in url:
|
||||
return self.resolve_filename('src/shared/ethtool-link-mode.xml', context)
|
||||
|
||||
return None
|
||||
|
||||
_parser = tree.XMLParser()
|
||||
# pylint: disable=no-member
|
||||
_parser.resolvers.add(CustomResolver())
|
||||
|
||||
def xml_parse(page):
|
||||
|
Loading…
Reference in New Issue
Block a user