Repository: mesos Updated Branches: refs/heads/master 30e7429c8 -> 8fa4d322a
Fixed python3/mesos-style.py type error. The main challenge when switching from Python 2 to Python 3 is to handle the strings, as many of them are now byte strings. I have checked the other uses of `sys.stderr.write` while working on this commit to check that it was the last issue of that type in python3/mesos-style.py. Review: https://reviews.apache.org/r/67340/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c8ce487a Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c8ce487a Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c8ce487a Branch: refs/heads/master Commit: c8ce487a2f55fcc6daf0968a7b53f12b3bcdc0e8 Parents: 30e7429 Author: Armand Grillet <agril...@mesosphere.io> Authored: Tue May 29 11:43:00 2018 +0200 Committer: Alexander Rukletsov <al...@apache.org> Committed: Tue May 29 11:43:29 2018 +0200 ---------------------------------------------------------------------- support/python3/mesos-style.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/c8ce487a/support/python3/mesos-style.py ---------------------------------------------------------------------- diff --git a/support/python3/mesos-style.py b/support/python3/mesos-style.py index c0e918c..6f9b9d4 100755 --- a/support/python3/mesos-style.py +++ b/support/python3/mesos-style.py @@ -285,8 +285,8 @@ class CppLinter(LinterBase): # Lines are stored and filtered, only showing found errors instead # of e.g., 'Done processing XXX.' which tends to be dominant output. for line in process.stderr: - if re.match('^(Done processing |Total errors found: )', - line.decode(sys.stdout.encoding)): + line = line.decode(sys.stdout.encoding) + if re.match('^(Done processing |Total errors found: )', line): continue sys.stderr.write(line)