diff options
author | Phil Schaf <flying-sheep@web.de> | 2013-11-25 18:23:35 +0100 |
---|---|---|
committer | Phil Schaf <flying-sheep@web.de> | 2013-11-25 18:23:35 +0100 |
commit | 8e15c8f61be6d76988161499bc8c13140dae40ed (patch) | |
tree | 43c168ed676d736cdfc99f45fa33c2e9c143df6c | |
parent | 6e145bdd08b5e9f06448cb5a991e4d8ea3476c58 (diff) | |
download | astroid-8e15c8f61be6d76988161499bc8c13140dae40ed.tar.gz |
fixed python 2 compatibility for BytesIO
-rw-r--r-- | scoped_nodes.py | 5 |
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 |