Update blacklist after changing notifier configs

This commit is contained in:
JonnyWong16 2017-12-01 12:31:27 -08:00
parent f9e7c2bdb6
commit ffb38ef599
2 changed files with 3 additions and 1 deletions

View file

@ -499,6 +499,7 @@ def add_notifier_config(agent_id=None, **kwargs):
db.upsert(table_name='notifiers', key_dict=keys, value_dict=values) db.upsert(table_name='notifiers', key_dict=keys, value_dict=values)
notifier_id = db.last_insert_id() notifier_id = db.last_insert_id()
logger.info(u"PlexPy Notifiers :: Added new notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id)) logger.info(u"PlexPy Notifiers :: Added new notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id))
blacklist_logger()
return notifier_id return notifier_id
except Exception as e: except Exception as e:
logger.warn(u"PlexPy Notifiers :: Unable to add notification agent: %s." % e) logger.warn(u"PlexPy Notifiers :: Unable to add notification agent: %s." % e)
@ -548,6 +549,7 @@ def set_notifier_config(notifier_id=None, agent_id=None, **kwargs):
try: try:
db.upsert(table_name='notifiers', key_dict=keys, value_dict=values) db.upsert(table_name='notifiers', key_dict=keys, value_dict=values)
logger.info(u"PlexPy Notifiers :: Updated notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id)) logger.info(u"PlexPy Notifiers :: Updated notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id))
blacklist_logger()
return True return True
except Exception as e: except Exception as e:
logger.warn(u"PlexPy Notifiers :: Unable to update notification agent: %s." % e) logger.warn(u"PlexPy Notifiers :: Unable to update notification agent: %s." % e)

View file

@ -318,6 +318,6 @@ def server_message(response, return_msg=False):
message = message[:150] + "..." message = message[:150] + "..."
if return_msg: if return_msg:
return message return unicode(message, 'UTF-8')
logger.debug("Server responded with message: %s", message) logger.debug("Server responded with message: %s", message)