зеркало из https://github.com/mozilla/treeherder.git
Bug 1326250 - Fix TypeError in PerformanceParser error logging (#2868)
Previously schema violations would result in: `TypeError: not enough arguments for format string` The exception `message` property is used instead of the `str` representation, since the latter results in pages of log output rather than just the human readable message: https://github.com/Julian/jsonschema/blob/v2.6.0/jsonschema/exceptions.py#L59-L88 https://python-jsonschema.readthedocs.io/en/v2.6.0/errors/#jsonschema.exceptions.ValidationError.message
This commit is contained in:
Родитель
4acbfb17c0
Коммит
1c71f301ca
|
@ -494,9 +494,8 @@ class PerformanceParser(ParserBase):
|
|||
except ValueError:
|
||||
logger.warning("Unable to parse Perfherder data from line: %s",
|
||||
line)
|
||||
except jsonschema.ValidationError:
|
||||
except jsonschema.ValidationError as e:
|
||||
logger.warning("Perfherder line '%s' does not comply with "
|
||||
"json schema: %s", line)
|
||||
# don't mark as complete, in case there are multiple performance
|
||||
# artifacts
|
||||
# self.complete = True
|
||||
"json schema: %s", line, e.message)
|
||||
|
||||
# Don't mark the parser as complete, in case there are multiple performance artifacts.
|
||||
|
|
Загрузка…
Ссылка в новой задаче