From: Stephen Finucane Date: Thu, 4 Jan 2018 15:43:41 +0000 (+0000) Subject: parser: Log when invalid project list-id passed X-Git-Tag: v2.1.0-rc1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b891f8df77127253ebc81874bf3f30dd84938cdb;p=thirdparty%2Fpatchwork.git parser: Log when invalid project list-id passed I thought there was a bug. Turns out I was just using the wrong list-id. Make this clearer. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/parser.py b/patchwork/parser.py index 1568bc44..05249df0 100644 --- a/patchwork/parser.py +++ b/patchwork/parser.py @@ -156,7 +156,7 @@ def find_project_by_id(list_id): try: project = Project.objects.get(listid=list_id) except Project.DoesNotExist: - pass + logger.debug("'%s' if not a valid project list-id", list_id) return project @@ -185,6 +185,9 @@ def find_project_by_header(mail): if project: break + if not project: + logger.debug("Could not find a list-id in mail headers", list_id) + return project