[PATCH] parser: Log when invalid project list-id passed
stephen at that.guru
Fri Jan 5 02:41:36 AEDT 2018
On Wed, 2017-12-13 at 14:26 -0500, Aaron Conole wrote:
> 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
Hmm, that's a good point. I was lumping user-driven errors with
application-driven errors. In any case, we already log an 'error'-level
log later in the application, so I've changed this to 'debug' in v2.
More information about the Patchwork