Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff5c6dc

Browse filesBrowse files
mi-actargos
authored andcommitted
tools: properly convert .gypi in install.py
It was breaking during install when .gypi strings had quotes in them. e.g.: 'foo': 'bar="baz"'
1 parent 484140e commit ff5c6dc
Copy full SHA for ff5c6dc

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Open diff view settings
Collapse file

‎tools/install.py‎

Copy file name to clipboardExpand all lines: tools/install.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

3+
import ast
34
import errno
4-
import json
55
import os
66
import re
77
import shutil
@@ -20,9 +20,7 @@ def abspath(*args):
2020

2121
def load_config():
2222
s = open('config.gypi').read()
23-
s = re.sub(r'#.*?\n', '', s) # strip comments
24-
s = re.sub(r'\'', '"', s) # convert quotes
25-
return json.loads(s)
23+
return ast.literal_eval(s)
2624

2725
def try_unlink(path):
2826
try:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.