summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/v8_gypfiles/GN-scraper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/v8_gypfiles/GN-scraper.py b/tools/v8_gypfiles/GN-scraper.py
index 59818ad737..ec72f1d47e 100644
--- a/tools/v8_gypfiles/GN-scraper.py
+++ b/tools/v8_gypfiles/GN-scraper.py
@@ -7,8 +7,8 @@ PLAIN_SOURCE_RE = re.compile('\s*"([^/$].+)"\s*')
def DoMain(args):
gn_filename, pattern = args
src_root = os.path.dirname(gn_filename)
- with open(gn_filename, 'r') as gn_file:
- gn_content = gn_file.read().encode('utf-8')
+ with open(gn_filename, 'rb') as gn_file:
+ gn_content = gn_file.read().decode('utf-8')
scraper_re = re.compile(pattern + r'\[([^\]]+)', re.DOTALL)
matches = scraper_re.search(gn_content)