use six.StringIO for compatibility with io.StringIO in python3
The newer version of six (1.4.1) provides six.StringIO which is a fake file object for textual data. It's an alias for cStringIO.StringIO, in python2 and io.StringIO in Python3 Change-Id: I5f4af05eb0754d85a73068d5f6b285d4be07cdfc
This commit is contained in:
parent
533d19df4a
commit
40e073a8a1
@ -19,11 +19,12 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import cStringIO as StringIO
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
|
||||
import six
|
||||
|
||||
from pylint import lint
|
||||
from pylint.reporters import text
|
||||
|
||||
@ -136,7 +137,7 @@ class ErrorKeys(object):
|
||||
|
||||
|
||||
def run_pylint():
|
||||
buff = StringIO.StringIO()
|
||||
buff = six.StringIO()
|
||||
reporter = text.ParseableTextReporter(output=buff)
|
||||
args = ["--include-ids=y", "-E", "manila"]
|
||||
lint.Run(args, reporter=reporter, exit=False)
|
||||
|
Loading…
Reference in New Issue
Block a user