GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: properly convert .gypi in install.py · nodejs/node@ff5c6dc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools
    • install.py
Expand file treeCollapse file tree
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)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.