summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Schaf <flying-sheep@web.de>2013-11-25 18:23:35 +0100
committerPhil Schaf <flying-sheep@web.de>2013-11-25 18:23:35 +0100
commit8e15c8f61be6d76988161499bc8c13140dae40ed (patch)
tree43c168ed676d736cdfc99f45fa33c2e9c143df6c
parent6e145bdd08b5e9f06448cb5a991e4d8ea3476c58 (diff)
downloadastroid-8e15c8f61be6d76988161499bc8c13140dae40ed.tar.gz
fixed python 2 compatibility for BytesIO
-rw-r--r--scoped_nodes.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scoped_nodes.py b/scoped_nodes.py
index 223c2d7..4a4d633 100644
--- a/scoped_nodes.py
+++ b/scoped_nodes.py
@@ -24,8 +24,11 @@ from __future__ import with_statement
__doctype__ = "restructuredtext en"
import sys
-from io import BytesIO
from itertools import chain
+try:
+ from io import BytesIO
+except ImportError:
+ from cStringIO import StringIO as BytesIO
from logilab.common.compat import builtins
from logilab.common.decorators import cached