Commit 2d883be6 authored by Stefan Behnel's avatar Stefan Behnel

safety import fix: 'io' isn't a very unique module name

parent 769720a1
...@@ -130,10 +130,12 @@ class NormalisedNewlineStream(object): ...@@ -130,10 +130,12 @@ class NormalisedNewlineStream(object):
data = self._read(0x1000) data = self._read(0x1000)
return u''.join(content).split(u'\n') return u''.join(content).split(u'\n')
try: io = None
if sys.version_info >= (2,6):
try:
import io import io
except ImportError: except ImportError:
io = None pass
def open_source_file(source_filename, mode="r", def open_source_file(source_filename, mode="r",
encoding=None, error_handling=None, encoding=None, error_handling=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment