diff --git a/webapp/utils.py b/webapp/utils.py index 8603d27..0f64d5d 100644 --- a/webapp/utils.py +++ b/webapp/utils.py @@ -32,6 +32,7 @@ from google.oauth2 import service_account from googleapiclient.discovery import build from googleapiclient.errors import HttpError + def get_file_extension(file_name, decoded_file): extension = imghdr.what(file_name, decoded_file) extension = "jpg" if extension == "jpeg" else extension @@ -150,7 +151,8 @@ def add_to_mailinglist(email: str): to = "ilari.ojakorpi@sahkoinsinoorikilta.fi" subject = "Web error: Failed adding to google groups" - body = "Error code: {}\nError details: {}\nEmail that was not added: {}\n\nAdd user manually to jäsenet groups.".format(err.status_code, err.error_details, email) + body = "Error code: {}\nError details: {}\nEmail that was not added: {}\n\nAdd user manually to jäsenet groups.".format( + err.status_code, err.error_details, email + ) send_email(to, subject, body) -