ni_from_manager: skip (and log) bugs without status flags (#1242)

* ni_from_manager: skip (and log) bugs without status flags

* Update auto_nag/scripts/ni_from_manager.py

Co-authored-by: Marco Castelluccio <mcastelluccio@mozilla.com>

* Update auto_nag/scripts/ni_from_manager.py

Co-authored-by: Marco Castelluccio <mcastelluccio@mozilla.com>

Co-authored-by: Marco Castelluccio <mcastelluccio@mozilla.com>
This commit is contained in:
calixteman 2021-12-02 05:17:09 -08:00 коммит произвёл GitHub
Родитель 28392fb0b8
Коммит 5b6770a3fd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from auto_nag import utils
from auto_nag import logger, utils
from auto_nag.bzcleaner import BzCleaner
from auto_nag.nag_me import Nag
@ -54,6 +54,11 @@ class NiFromManager(BzCleaner, Nag):
if not self.filter_bug(priority):
return None
for flag in self.status_flags:
if flag not in bug:
logger.warning(f"Bug {bug['id']} doesn't have flag {flag}")
return None
any_affected = any(bug[flag] == "affected" for flag in self.status_flags)
has_manager = False