#1246 split admin_emails option for kojid
Merged by tkopecek. Opened by tkopecek.
tkopecek/koji issue1240  into  master

Download 1246.patch

If there are multiple e-mailes separated by comma of space, they should
be split for correct usage of smtplib.sendmail.

Fixes: https://pagure.io/koji/issue/1240

:thumbsup:

While this looks good, wouldn't a nargs type option work here? That way it can accept multiple items and turn it into a tuple?

rebased onto 601686c9d2f657ae0d49fb0e74fc705f28498a00

ping @breilly @julian8628

:thumbsup:

1 new commit added

  • fix splitting addresses

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

With this change, options.admin_emails can be either a string, a list, or None. Whereas before it was either a string or None.

This changes the api (renames an arg for add_mail_logger), and changes the usage for the kojid and kojivmd.

I think simply the list conversion added to add_mail_logger is sufficient to address #1240. I would also not rename the arg. While I don't expect that outside code is necessarily calling this with named args, I'm also hesitant to make api changes for a case like this when the misnomer could simply be explained in the docstring.

Makes sense, updated

rebased onto 42572874d9d2e5f4e1de0ce21d4c5e223307716a

:thumbsup:

:thumbsup:

Commit 1ddb03dc fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

Metadata