[gm.py] Migrate to Python 3

The code was almost compatible, only one small issue had snuck in.

No-try: true
Change-Id: I52225fb2092bf16a5fffbde957cd1dfe4f2c4fd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2093492
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66642}
This commit is contained in:
Jakob Kummerow 2020-03-08 16:46:05 +01:00 committed by Commit Bot
parent 3fab9d05cf
commit 085c804f79

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@ -174,7 +174,7 @@ def _CallWithOutput(cmd):
try:
while True:
try:
data = os.read(master, 512)
data = os.read(master, 512).decode('utf-8')
except OSError as e:
if e.errno != errno.EIO: raise
break # EIO means EOF on some systems