From b891f8df77127253ebc81874bf3f30dd84938cdb Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 4 Jan 2018 15:43:41 +0000 Subject: [PATCH] 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 --- patchwork/parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.47.3