Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: no need to encode strings anymore #4627

Merged
merged 3 commits into from
Feb 10, 2020
Merged

Fix: no need to encode strings anymore #4627

merged 3 commits into from
Feb 10, 2020

Conversation

arikfr
Copy link
Member

@arikfr arikfr commented Feb 9, 2020

What type of PR is this? (check all applicable)

  • Bug Fix

Description

The encode call is a relic from Python 2 an no longer needed.

Related Tickets & Documents

Closes #4611.

@@ -46,7 +46,7 @@ def notify(self, alert, query, user, new_state, app, host, options):
logging.debug("Notifying: %s", recipients)

try:
alert_name = alert.name.encode("utf-8", "ignore")
alert_name = alert.name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just drop this variable and use alert.name in line 57 :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arikfr arikfr changed the title Fix: no need to encode Alert name in emails Fix: no need to encode strings anymore Feb 9, 2020
@arikfr
Copy link
Member Author

arikfr commented Feb 9, 2020

Grepped the code for additional places we use .encode in and removed some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alerts: Korean characters in default template misbehave
2 participants