mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
gyp: make StringIO work in ninja.py
Allow both Python 2 and 3 to access StringIO. This fixes `./configure --ninja`, which was broken by https://github.com/nodejs/node/pull/29371. See: https://github.com/nodejs/node/pull/29371#issuecomment-527331969 PR-URL: https://github.com/nodejs/node/pull/29414 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit is contained in:
parent
6ce87c027d
commit
40060f4e42
@ -20,7 +20,10 @@ from gyp.common import OrderedSet
|
|||||||
import gyp.msvs_emulation
|
import gyp.msvs_emulation
|
||||||
import gyp.MSVSUtil as MSVSUtil
|
import gyp.MSVSUtil as MSVSUtil
|
||||||
import gyp.xcode_emulation
|
import gyp.xcode_emulation
|
||||||
from io import StringIO
|
try:
|
||||||
|
from cStringIO import StringIO
|
||||||
|
except ImportError:
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
from gyp.common import GetEnvironFallback
|
from gyp.common import GetEnvironFallback
|
||||||
import gyp.ninja_syntax as ninja_syntax
|
import gyp.ninja_syntax as ninja_syntax
|
||||||
|
Loading…
Reference in New Issue
Block a user