Don't die on delete requests

Perform src_project checks only on actions that actually have a
src_project
This commit is contained in:
Ludwig Nussel 2017-11-02 14:06:06 +01:00
parent 0a45aba664
commit 312c18024d

View File

@ -96,7 +96,7 @@ class MaintenanceChecker(ReviewBot.ReviewBot):
pkgname = a.tgt_package
project = a.tgt_project
if project.startswith('openSUSE:Leap:'):
if project.startswith('openSUSE:Leap:') and hasattr(a, 'src_project'):
mapping = MaintenanceChecker._get_lookup_yml(self.apiurl, project)
if mapping is None:
self.logger.error("error loading mapping for {}".format(project))