diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2018-12-05 14:36:09 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2018-12-05 14:36:09 -0500 |
commit | 59306b97739949c58ff0c85428c749b1c50b46f9 (patch) | |
tree | 03d9eaae0c65c82f15e0b13fe6e8ce195fdafe2b | |
parent | d04dadee8b168f0abb069e229aedbf65c2e34d8c (diff) | |
download | korg-helpers-59306b97739949c58ff0c85428c749b1c50b46f9.tar.gz |
Don't try to get emails out of a NoneType
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | git-patchwork-bot.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/git-patchwork-bot.py b/git-patchwork-bot.py index c9fcb35..4af94b0 100755 --- a/git-patchwork-bot.py +++ b/git-patchwork-bot.py @@ -580,8 +580,12 @@ def notify_submitters(rm, serieslist, refname, config, revs, nomail): logger.debug('Skipping neverto address:%s', submitter.get('email')) continue - ccs = [chunk[1] for chunk in getaddresses([headers.get('Cc')])] - if 'onlyifcc' in config: + ccs = [] + cchdr = headers.get('Cc') + if cchdr: + ccs = [chunk[1] for chunk in getaddresses([cchdr])] + + if ccs and 'onlyifcc' in config: match = None for chunk in config['onlyifcc'].split(','): if chunk.strip() in ccs: @@ -591,7 +595,7 @@ def notify_submitters(rm, serieslist, refname, config, revs, nomail): logger.debug('Skipping %s due to onlyifcc=%s', submitter.get('email'), config['onlyifcc']) continue - if 'neverifcc' in config: + if ccs and 'neverifcc' in config: match = None for chunk in config['neverifcc'].split(','): if chunk.strip() in ccs: |