Skip to content

Commit

Permalink
Fix the issue that StringIO doesn't work in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Jun 20, 2015
1 parent 14ba0ff commit 152364c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/pyspark/streaming/flume.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
# limitations under the License.
#

from StringIO import StringIO
if sys.version >= "3":
from io import StringIO
else:
from StringIO import StringIO
from py4j.java_gateway import Py4JJavaError

from pyspark.storagelevel import StorageLevel
Expand Down

0 comments on commit 152364c

Please sign in to comment.