Skip to content
Browse files

tools: fix mixup with bytes.decode() and str.encode()

We want to read a bytes file and decode the contents as utf-8 so we can
compare against a utf-8 pattern.

PR-URL: #29208
Reviewed-By: Richard Lau <>
Reviewed-By: Anna Henningsen <>
Reviewed-By: Michaël Zasso <>
  • Loading branch information...
cclauss authored and BridgeAR committed Aug 19, 2019
1 parent 35bca31 commit 925141f946a40014e25b06ef27425866ea8153cd
Showing with 2 additions and 2 deletions.
  1. +2 −2 tools/v8_gypfiles/
@@ -7,8 +7,8 @@
def DoMain(args):
gn_filename, pattern = args
src_root = os.path.dirname(gn_filename)
with open(gn_filename, 'r') as gn_file:
gn_content ='utf-8')
with open(gn_filename, 'rb') as gn_file:
gn_content ='utf-8')

scraper_re = re.compile(pattern + r'\[([^\]]+)', re.DOTALL)
matches =

0 comments on commit 925141f

Please sign in to comment.
You can’t perform that action at this time.