[elbe-devel] [PATCH] pylint: fix undefined variable 'e'
Manuel Traut
manut at linutronix.de
Wed Dec 5 09:00:15 CET 2018
On 08:50 Wed 05 Dec , Yegor Yefremov wrote:
> On Wed, Dec 5, 2018 at 8:39 AM Manuel Traut <manut at linutronix.de> wrote:
> >
> > soapclient.py:102, PyLint, Priority: High
> > Undefined variable 'e'
> >
> > Signed-off-by: Manuel Traut <manut at linutronix.de>
> > ---
> > elbepack/soapclient.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
> > index c7d822d3..efd6475e 100644
> > --- a/elbepack/soapclient.py
> > +++ b/elbepack/soapclient.py
> > @@ -94,7 +94,7 @@ class ElbeSoapClient(object):
> > while True:
> > try:
> > ret = self.service.get_file(builddir, filename, part)
> > - except BadStatusLine:
> > + except BadStatusLine as e:
>
> Why not err to comply with Python's naming scheme?
Because e is used below and this fixes the pylint complain.
If you like a refactoring, feel free to send patches that convert e to err
all over the code. Because this would address your point. 2 changes shouldn't
be mixed in 1 commit.
Thanks,
Manu
> Yegor
>
> > retry = retry - 1
> >
> > print("get_file part %d failed, retry %d times" % (part, retry),
> > --
> > 2.19.2
> >
> >
> > _______________________________________________
> > elbe-devel mailing list
> > elbe-devel at linutronix.de
> > https://lists.linutronix.de/mailman/listinfo/elbe-devel
More information about the elbe-devel
mailing list