fix: authenticate_message: Do not set None to spf_result.smtp_mailfrom#37
Open
fumiyas wants to merge 1 commit intoValiMail:masterfrom
Conversation
Closes issue ValiMail#33. ``` self = <test_authentication.TestAuthenticateMessage testMethod=test_authenticate_dmarc_prev_spf> def test_authenticate_dmarc_prev_spf(self): prev = "Authentication-Results: example.com; spf=pass smtp.mailfrom=gmail.com" > res = authenticate_message(self.message2, "example.com", prev=prev, spf=False, dkim=True, dmarc=True, dnsfunc=self.dnsfunc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ authheaders/test/test_authentication.py:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ authheaders/__init__.py:434: in authenticate_message return str(auth_res) ^^^^^^^^^^^^^ /usr/lib/python3/dist-packages/authres/core.py:476: in __str__ return ''.join((self.HEADER_FIELD_NAME, ': ', self.header_value())) ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3/dist-packages/authres/core.py:492: in header_value strs.append(str(result)) ^^^^^^^^^^^ /usr/lib/python3/dist-packages/authres/core.py:222: in __str__ strs.append(str(property_)) ^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <authres.core.AuthenticationResultProperty object at 0x7fc4178465f0> def __str__(self): if self.comment: return '%s.%s=%s (%s)' % (self.type, self.name, self.value.quote_if_needed(), self.comment) else: > return '%s.%s=%s' % (self.type, self.name, self.value.quote_if_needed()) ^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'quote_if_needed' /usr/lib/python3/dist-packages/authres/core.py:132: AttributeError ```
Author
|
This pull request will likely also fix bug #16. |
Author
|
I've forked to: https://github.com/OSSTech-JP/python-email-authheaders |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes issue #33.