Closed roib20 closed 3 years ago
In the meantime I found and fixed another, different bug. I want to PR it as well but was hoping this could get merged first, to avoid any possible conflicts.
In the meantime I found and fixed another, different bug. I want to PR it as well but was hoping this could get merged first, to avoid any possible conflicts.
Whatever you prefer is fine, but it's also totally okay to submit multiple PRs, and let me worry about resolving merge conflicts.
This commit fixes an additional KeyError bug in gmail.py.
Explanation of the bug: in rare cases where a "payload" dict object is missing a 'parts' key, an unhandled KeyError exception is caused by the
for part in payload['parts']
statement under the_evaluate_message_payload
function.Fix: This commit fixes the KeyError bug by adding the
if 'parts' in payload
statement, ensuring that the key exists in the payload dictionary before proceeding.