Private GIT

Skip to content
Snippets Groups Projects
Commit 4706c47a authored by Kfir Hadas's avatar Kfir Hadas Committed by miigotu
Browse files

Fix IndexError in error submitter (#3957)

Forgot to escape `{7}` in regex, which interfered with `.format()`.
Fixes #3955
parent 434df4ca
Branches
No related tags found
No related merge requests found
...@@ -324,7 +324,7 @@ class Logger(object): # pylint: disable=too-many-instance-attributes ...@@ -324,7 +324,7 @@ class Logger(object): # pylint: disable=too-many-instance-attributes
title_error = 'UNKNOWN' title_error = 'UNKNOWN'
gist = None gist = None
regex = r'^({0})\s+([A-Z]+)\s+[A-Za-z0-9\-\[\] :]+::\s(?:\[[\w]{7}\]).*$'.format(re.escape(cur_error.time)) regex = r'^({0})\s+([A-Z]+)\s+[A-Za-z0-9\-\[\] :]+::\s(?:\[[\w]{{7}}\]).*$'.format(re.escape(cur_error.time))
for i, data in enumerate(__log_data): for i, data in enumerate(__log_data):
match = re.match(regex, data) match = re.match(regex, data)
if match: if match:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment