chore: rename var to not clash with re-used one

pull/1336/head
John Torakis 2025-05-18 09:51:36 +03:00
parent f7131e54b1
commit 7ebd533d10
1 changed files with 3 additions and 3 deletions

View File

@ -617,14 +617,14 @@ class NotifySlack(NotifyBase):
# Support <url|desc>, <url> entries # Support <url|desc>, <url> entries
for match in self._re_url_support.findall(body): for match in self._re_url_support.findall(body):
# Swap back any ampersands previously updaated # Swap back any ampersands previously updaated
url = match[1].replace('&amp;', '&') url_ = match[1].replace('&amp;', '&')
desc = match[2].strip() desc = match[2].strip()
# Update our string # Update our string
body = re.sub( body = re.sub(
re.escape(match[0]), re.escape(match[0]),
'<{url}|{desc}>'.format(url=url, desc=desc) '<{url}|{desc}>'.format(url=url_, desc=desc)
if desc else '<{url}>'.format(url=url), if desc else '<{url}>'.format(url=url_),
body, body,
re.IGNORECASE) re.IGNORECASE)