Commit c65bc875 authored by Stefan Behnel's avatar Stefan Behnel

reformat code

parent a7c82988
...@@ -217,12 +217,14 @@ def detect_opened_file_encoding(f): ...@@ -217,12 +217,14 @@ def detect_opened_file_encoding(f):
normalise_newlines = re.compile(u'\r\n?|\n').sub normalise_newlines = re.compile(u'\r\n?|\n').sub
class NormalisedNewlineStream(object): class NormalisedNewlineStream(object):
"""The codecs module doesn't provide universal newline support. """The codecs module doesn't provide universal newline support.
This class is used as a stream wrapper that provides this This class is used as a stream wrapper that provides this
functionality. The new 'io' in Py2.6+/3.x supports this out of the functionality. The new 'io' in Py2.6+/3.x supports this out of the
box. box.
""" """
def __init__(self, stream): def __init__(self, stream):
# let's assume .read() doesn't change # let's assume .read() doesn't change
self.stream = stream self.stream = stream
...@@ -254,6 +256,7 @@ class NormalisedNewlineStream(object): ...@@ -254,6 +256,7 @@ class NormalisedNewlineStream(object):
else: else:
raise NotImplementedError raise NotImplementedError
io = None io = None
if sys.version_info >= (2,6): if sys.version_info >= (2,6):
try: try:
......
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