diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2022-10-27 22:53:18 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-12-05 15:46:46 -0500 |
| commit | 7c9705b801e4ab55732390eebfe896b4051bfafb (patch) | |
| tree | 91cd63caa214254f26740b550766588f5d4afbd3 | |
| parent | 9e8a3b9cbd5b90cc6384020ac5799ea054912f55 (diff) | |
| download | meson-7c9705b801e4ab55732390eebfe896b4051bfafb.tar.gz | |
mtest: early return when parsing blank lines in TAP
Just like comment lines, blank lines do nothing. Before commit
a7e458effadbc884eacf34528df3a57b60e43fe3 we ended off the parser by
returning if the line was blank, because we needed to in order to catch
non-blank lines as errors. But really, we should have always returned
much earlier and not wasted time attempting to process anything.
| -rw-r--r-- | mesonbuild/mtest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index f13e755ac..f3f5f264e 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -380,7 +380,7 @@ class TAPParser: self.state = self._MAIN assert self.state == self._MAIN - if line.startswith('#'): + if not line or line.startswith('#'): return m = self._RE_TEST.match(line) |
