Bug 1283340: python: fix .ycm_extra_conf.py for python 3
MozReview-Commit-ID: 2HTAftYwZPJ
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -1,17 +1,20 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import imp
import os
-from StringIO import StringIO
import shlex
import sys
+try:
+ from StringIO import StringIO
+except ImportError:
+ from io import StringIO
old_bytecode = sys.dont_write_bytecode
sys.dont_write_bytecode = True
path = os.path.join(os.path.dirname(__file__), 'mach')
if not os.path.exists(path):
path = os.path.join(os.path.dirname(__file__), 'config.status')