#3317 check if mail_id is set before encoding it
Merged by pingou. Opened by karsten.
karsten/pagure mail_id_encode  into  master

Download 3317.patch

this fixes "AttributeError: 'NoneType' object has no attribute 'encode' in pagure/lib/notify.py, line 333

:thumbsup:

Do you have an idea of when the mail_id isn't being set?

I've observed this problem recently as well, I don't know what causes it. But it does prevent local new user creation. :(

I've observed this problem recently as well, I don't know what causes it. But it does prevent local new user creation. :(

This seems like a bug, basically I'm wondering if we're not fixing the symptom of the bug rather than its cause.

I'm also not fan of this as we suddenly hash only the salt which is quite the opposite of what the goal of the salt is

I haven't tracked that down. It happened when I tried to create a local user, too.

Reading the code and function definition, it seems not specifying the mail_id is valid, in that case I propose we just skip the entire block.

If there is no mail_id header, there is no point to set the Reply-To or a Mail-Followup-To headers as well

1 new commit added

  • skip Reply-To or Mail-Followup-To when mail_id is unset

rebased onto 297953786df867968f4749101f426106d7663d8d

rebased onto fae967c7cb4160c58f7b8cf613819cf64f8da53b

rebased onto 3a16017679691804f39c32187a02e6d20f22ed3d

1 new commit added

  • add testcase for https://pagure.io/pagure/issue/3289

Looks like jenkins is unhappy about the flake8 check

1 new commit added

  • fix whitespace

Pretty please pagure-ci rebuild

the last jenkins task tied out (#422). does this work as part of a comment, too ?
pretty please pagure-ci rebuild

@karsten pagure-ci should rebuild when you rebase and force push too.

should rebuild when you rebase and force push too.

Should but this seems to be broken in 4.0.3 (fixed in git already though)

Running the tests locally :)

I'm going to merge this one manually, tests are passing for me here :)

Commit 63175dbf fixes this pull-request

Pull-Request has been merged by pingou

Metadata