[PATCH] parser: Log when invalid project list-id passed

Aaron Conole aconole at bytheb.org
Thu Dec 14 06:26:00 AEDT 2017


Stephen Finucane <stephen at that.guru> writes:

> I thought there was a bug. Turns out I was just using the wrong list-id.
> Make this clearer.
>
> Signed-off-by: Stephen Finucane <stephen at that.guru>
> ---
>  patchwork/parser.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/patchwork/parser.py b/patchwork/parser.py
> index 1568bc44..37e4365c 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.error("'%s' if not a valid project list-id", list_id)
                              ^ maybe this should be 'is' ?

Also maybe it should be an info log?  Afterall, there's no error here
from the application.

>      return project



More information about the Patchwork mailing list