[Piglit] [PATCH 1/6] test/igt.py: Fix whitepace warnings for pylint

Dylan Baker baker.dylan.c at gmail.com
Fri Jan 23 09:19:50 PST 2015


On Friday, January 23, 2015 15:00:51 Thomas Wood wrote:
> On 19 January 2015 at 17:38, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > ---
> >  tests/igt.py | 22 +++++++++++-----------
> >  1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/tests/igt.py b/tests/igt.py
> > index e65b8a9..4d76636 100644
> > --- a/tests/igt.py
> > +++ b/tests/igt.py
> > @@ -129,22 +129,22 @@ tests.extend(listTests("multi-tests"))
> >
> >  def addSubTestCases(test):
> >      proc = subprocess.Popen(
> > -            [os.path.join(igtTestRoot, test), '--list-subtests'],
> > -            stdout=subprocess.PIPE,
> > -            stderr=subprocess.PIPE,
> > -            env=os.environ.copy(),
> > -            universal_newlines=True
> > -            )
> > -    out, err = proc.communicate()
> > +        [os.path.join(igtTestRoot, test), '--list-subtests'],
> > +        stdout=subprocess.PIPE,
> > +        stderr=subprocess.PIPE,
> > +        env=os.environ.copy(),
> > +        universal_newlines=True
> > +        )
> > +    out, _ = proc.communicate()
> 
> Since err was not used, should the pipe also be removed?

Probably, yes. I'll check and roll a v2 of the series with the other
changes you suggested.

> 
> >
> >      # a return code of 79 indicates there are no subtests
> >      if proc.returncode == 79:
> > -         profile.test_list[grouptools.join('igt', test)] = IGTTest(test)
> > -         return
> > +        profile.test_list[grouptools.join('igt', test)] = IGTTest(test)
> > +        return
> >
> >      if proc.returncode != 0:
> > -         print "Error: Could not list subtests for " + test
> > -         return
> > +        print "Error: Could not list subtests for " + test
> > +        return
> >
> >      subtests = out.split("\n")
> >
> > --
> > 2.2.1
> >
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150123/3a8290e8/attachment.sig>


More information about the Piglit mailing list