Skip to content

Commit

Permalink
gyp: make StringIO work in ninja.py
Browse files Browse the repository at this point in the history
Allow both Python 2 and 3 to access StringIO.

This fixes `./configure --ninja`, which was broken by
#29371.

See: #29371 (comment)

PR-URL: #29414
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  • Loading branch information
cclauss authored and targos committed Sep 20, 2019
1 parent 95431ea commit a20a8f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
import gyp.msvs_emulation
import gyp.MSVSUtil as MSVSUtil
import gyp.xcode_emulation
from io import StringIO
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO

from gyp.common import GetEnvironFallback
import gyp.ninja_syntax as ninja_syntax
Expand Down

0 comments on commit a20a8f4

Please sign in to comment.