diff options
author | Georg Brandl <georg@python.org> | 2010-06-05 18:27:43 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-06-05 18:27:43 +0200 |
commit | 8c7e288129ab1d591efbe6de20ac02548335d83d (patch) | |
tree | 758701d0b07fef6dd57b1bf3224381b49f11bf8b /sphinx/directives/code.py | |
parent | af51c2f7bb52097b092d6b97bdaaa4eecd5d69dc (diff) | |
download | sphinx-git-8c7e288129ab1d591efbe6de20ac02548335d83d.tar.gz |
#440: Remove usage of a Python >= 2.5 API in the ``literalinclude`` directive.
CodecInfo is not a namedtuple, so accessing attributes on 2.4 fails.
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index b4375a98c..50ebcfde4 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -118,7 +118,7 @@ class LiteralInclude(Directive): codec_info = codecs.lookup(encoding) try: f = codecs.StreamReaderWriter(open(fn, 'U'), - codec_info.streamreader, codec_info.streamwriter, 'strict') + codec_info[2], codec_info[3], 'strict') lines = f.readlines() f.close() except (IOError, OSError): |