jp(pubsub): minor code style fixes

This commit is contained in:
Goffi 2019-02-15 22:24:57 +01:00
commit d8ab8b76f8

View file

@ -698,8 +698,8 @@ class NodeSchemaEdit(base.CommandBase, common.BaseEdit):
try:
from lxml import etree
except ImportError:
self.disp(
u'lxml module must be installed to use edit, please install it with "pip install lxml"',
self.disp(u'lxml module must be installed to use edit, please install it '
u'with "pip install lxml"',
error=True,
)
self.host.quit(1)
@ -975,8 +975,8 @@ class Edit(base.CommandBase, common.BaseEdit):
try:
from lxml import etree
except ImportError:
self.disp(
u'lxml module must be installed to use edit, please install it with "pip install lxml"',
self.disp(u'lxml module must be installed to use edit, please install it '
u'with "pip install lxml"',
error=True,
)
self.host.quit(1)
@ -1191,9 +1191,8 @@ class Search(base.CommandBase):
"--max-depth",
type=int,
default=0,
help=_(
u"maximum depth of recursion (will search linked nodes if > 0, DEFAULT: 0)"
),
help=_(u"maximum depth of recursion (will search linked nodes if > 0, "
u"DEFAULT: 0)"),
)
self.parser.add_argument(
"-M",
@ -1256,8 +1255,9 @@ class Search(base.CommandBase):
dest="filters",
type=filter_python,
metavar="PYTHON_CODE",
help=_(
u'Python expression which much return a bool (True to keep item, False to reject it). "item" is raw text item, "item_xml" is lxml\'s etree.Element'
help=_(u'Python expression which much return a bool (True to keep item, '
u'False to reject it). "item" is raw text item, "item_xml" is '
u'lxml\'s etree.Element'
),
)
@ -1386,9 +1386,8 @@ class Search(base.CommandBase):
return self.etree.fromstring(item)
except self.etree.XMLSyntaxError:
self.disp(
_(
u"item doesn't looks like XML, you have probably used --only-matching somewhere before and we have no more XML"
),
_(u"item doesn't looks like XML, you have probably used --only-matching "
u"somewhere before and we have no more XML"),
error=True,
)
self.host.quit(C.EXIT_BAD_ARG)