Update build notify text error message

This commit is contained in:
JonnyWong16 2018-01-07 18:45:55 -08:00
parent 157af84226
commit 71c20002b8

View file

@ -947,7 +947,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
try: try:
script_args = [custom_formatter.format(unicode(arg), **parameters) for arg in subject.split()] script_args = [custom_formatter.format(unicode(arg), **parameters) for arg in subject.split()]
except LookupError as e: except LookupError as e:
logger.error(u"Tautulli NotificationHandler :: Unable to parse field %s in script argument. Using fallback." % e) logger.error(u"Tautulli NotificationHandler :: Unable to parse parameter %s in script argument. Using fallback." % e)
script_args = [] script_args = []
except Exception as e: except Exception as e:
logger.error(u"Tautulli NotificationHandler :: Unable to parse custom script arguments: %s. Using fallback." % e) logger.error(u"Tautulli NotificationHandler :: Unable to parse custom script arguments: %s. Using fallback." % e)
@ -958,7 +958,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
try: try:
subject = custom_formatter.format(unicode(subject), **parameters) subject = custom_formatter.format(unicode(subject), **parameters)
except LookupError as e: except LookupError as e:
logger.error(u"Tautulli NotificationHandler :: Unable to parse field %s in notification subject. Using fallback." % e) logger.error(u"Tautulli NotificationHandler :: Unable to parse parameter %s in notification subject. Using fallback." % e)
subject = unicode(default_subject).format(**parameters) subject = unicode(default_subject).format(**parameters)
except Exception as e: except Exception as e:
logger.error(u"Tautulli NotificationHandler :: Unable to parse custom notification subject: %s. Using fallback." % e) logger.error(u"Tautulli NotificationHandler :: Unable to parse custom notification subject: %s. Using fallback." % e)
@ -967,7 +967,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
try: try:
body = custom_formatter.format(unicode(body), **parameters) body = custom_formatter.format(unicode(body), **parameters)
except LookupError as e: except LookupError as e:
logger.error(u"Tautulli NotificationHandler :: Unable to parse field %s in notification body. Using fallback." % e) logger.error(u"Tautulli NotificationHandler :: Unable to parse parameter %s in notification body. Using fallback." % e)
body = unicode(default_body).format(**parameters) body = unicode(default_body).format(**parameters)
except Exception as e: except Exception as e:
logger.error(u"Tautulli NotificationHandler :: Unable to parse custom notification body: %s. Using fallback." % e) logger.error(u"Tautulli NotificationHandler :: Unable to parse custom notification body: %s. Using fallback." % e)