mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-19 13:40:43 +00:00
13 lines
381 B
Python
13 lines
381 B
Python
import logging
|
|
|
|
|
|
class IgnoreVariableDoesNotExist(logging.Filter):
|
|
def filter(self, record):
|
|
if record.exc_info:
|
|
(errType, errValue, _) = record.exc_info
|
|
while errValue:
|
|
if type(errValue).__name__ == "VariableDoesNotExist":
|
|
return False
|
|
errValue = errValue.__context__
|
|
return True
|