зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476053 - Handle invalid json in metadata updates, r=ato
Sometimes we get errors that result in invalid json in the logs. There's nothing reasonable to do about this during metadata updates so just skip it MozReview-Commit-ID: 4QuM7M3lXGv --HG-- extra : rebase_source : 7e828a32c0a05338ff050f16ab6a91761e58d9b0
This commit is contained in:
Родитель
f380927ba7
Коммит
4443a88796
|
@ -250,7 +250,11 @@ class ExpectedUpdater(object):
|
|||
def update_from_raw_log(self, log_file):
|
||||
action_map = self.action_map
|
||||
for line in log_file:
|
||||
data = json.loads(line)
|
||||
try:
|
||||
data = json.loads(line)
|
||||
except ValueError:
|
||||
# Just skip lines that aren't json
|
||||
continue
|
||||
action = data["action"]
|
||||
if action in action_map:
|
||||
action_map[action](data)
|
||||
|
|
Загрузка…
Ссылка в новой задаче