mtest: Check that stdout is not None before seeking

As can be the case if additional_error is None and verbose is used.

Fixes #4470
pull/4466/head
Dylan Baker 6 years ago committed by Jussi Pakkanen
parent 11e3011a6b
commit e921e38301
  1. 16
      mesonbuild/mtest.py

@ -371,13 +371,17 @@ class SingleTestRunner:
endtime = time.time()
duration = endtime - starttime
if additional_error is None:
stdout.seek(0)
stdo = decode(stdout.read())
if stderr != stdout:
stderr.seek(0)
stde = decode(stderr.read())
if stdout is None: # if stdout is None stderr should be as well
stdo = ''
stde = ''
else:
stde = ""
stdout.seek(0)
stdo = decode(stdout.read())
if stderr != stdout:
stderr.seek(0)
stde = decode(stderr.read())
else:
stde = ""
else:
stdo = ""
stde = additional_error

Loading…
Cancel
Save