Skip to content

Commit

Permalink
[Py3] fix py3 issue in tools
Browse files Browse the repository at this point in the history
Bug: v8:9871
Change-Id: I4084771cfc4d34f8e1b9d5265e115f9eac1098d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2646165
Reviewed-by: Dan Elphick <[email protected]>
Reviewed-by: Michael Achenbach <[email protected]>
Commit-Queue: Gus Caplan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#72293}
  • Loading branch information
devsnek authored and Commit Bot committed Jan 25, 2021
1 parent b2860ad commit b6ba105
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/gen-v8-gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
# found in the LICENSE file.

import argparse
from io import BytesIO
import os
import sys

if (sys.version_info >= (3, 0)):
from io import StringIO
else:
from io import BytesIO as StringIO


def parse_args():
global args
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -60,7 +65,7 @@ def generate_header(out):

def main():
parse_args()
header_stream = BytesIO("")
header_stream = StringIO("")
generate_header(header_stream)
contents = header_stream.getvalue()
if args.output:
Expand Down

0 comments on commit b6ba105

Please sign in to comment.