From 274b2718c62ff77bcfde88aaa7f641e3687382bb Mon Sep 17 00:00:00 2001 From: Alexandre Beloin Date: Mon, 23 Feb 2015 13:41:09 -0500 Subject: [PATCH] Added apikey to censoredformatter This is needed because Newznab apikey isn't stored as key=value in a section in config.ini. --- sickbeard/logger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sickbeard/logger.py b/sickbeard/logger.py index 303d3cc1..0ae2d68e 100644 --- a/sickbeard/logger.py +++ b/sickbeard/logger.py @@ -59,6 +59,8 @@ class CensoredFormatter(logging.Formatter, object): for k, v in censoredItems.items(): if v and len(v) > 0 and v in msg: msg = msg.replace(v, len(v) * '*') + # Needed because Newznab apikey isn't stored as key=value in a section. + msg = re.sub('apikey\=[^\&]*\&','apikey\=**********\&', msg) return msg