mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-07 11:58:01 -05:00
Fix for sickragetv/sickrage-issues#236
This commit is contained in:
parent
885ef128fc
commit
d08d401769
@ -51,8 +51,11 @@ class NullHandler(logging.Handler):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class CensoredFormatter(logging.Formatter):
|
class CensoredFormatter(logging.Formatter):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(CensoredFormatter, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
def format(self, record):
|
def format(self, record):
|
||||||
msg = record.getMessage()
|
msg = super(CensoredFormatter, self).format(record)
|
||||||
for k, v in censoredItems.items():
|
for k, v in censoredItems.items():
|
||||||
if v and len(v) > 0 and v in msg:
|
if v and len(v) > 0 and v in msg:
|
||||||
msg = msg.replace(v, len(v) * '*')
|
msg = msg.replace(v, len(v) * '*')
|
||||||
|
Loading…
Reference in New Issue
Block a user