diff --git a/tools/gyp/pylib/gyp/generator/ninja.py b/tools/gyp/pylib/gyp/generator/ninja.py index 7d1d3b7b30b5f1..e66979ddbb5273 100644 --- a/tools/gyp/pylib/gyp/generator/ninja.py +++ b/tools/gyp/pylib/gyp/generator/ninja.py @@ -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