unexpected logging and handling exceptions
sorry, in typing this I've realized this is probably less of a question and more of a request or maybe event just feedback.
when importing the module and calling dkim_verify as follows:
dkim_result = dkim.dkim_
results in several unexpected logs being written
ERROR:
ERROR:
ERROR:
ERROR:
I had assumed that by not passing a logger variable to dkim_verify that all logging would be disabled - clearly this isn't the case
my project consists of generating metadata on emails - knowing that an email's DKIM signature's validation had a missing public key, or bad version can be a useful piece of information regarding the email.
as a user importing the module into another project, I'd prefer the exceptions be handled further "upstream" instead of being logged and handled in returning False. For instance, in my use case I could handle the exception when I call dkim.dkim_verify and take different actions based on the content of the exceptions.
However, because these exceptions are just being logged (and returning false) instead of allowed to be raised through to the "upstream" functions, I am unable to do so.
I assume the fact the verify function returns True or False (regardless of errors encountered) is by design, it does limit the options in being able to use other useful information generated when parsing the DKIM signature.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- dkimpy Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Brandon Murphy for more information if necessary.