Fix transposition of CodecInfo streamreader and streamwriter attributes
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Aug 2009 01:05:43 +0000 (01:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Aug 2009 01:05:43 +0000 (01:05 -0000)
inside _gen_missing_encodings(). This solves 'TypeError: an integer is
required' exceptions from codecs.open().readlines([sizehint]), triggered
when python is built with USE=build (stage 1). Thanks to Daniel Robbins
for reporting.

svn path=/main/trunk/; revision=13925

pym/portage/__init__.py

index 7b5d56048d04fb833f36d3300098e39362802960..a152293d8e982407ccb7ecd4d30cb1edd6d1cf81 100644 (file)
@@ -8007,8 +8007,8 @@ def _gen_missing_encodings(missing_encodings):
                        decode=utf8decode,
                        incrementalencoder=Utf8IncrementalEncoder,
                        incrementaldecoder=Utf8IncrementalDecoder,
-                       streamreader=Utf8StreamWriter,
-                       streamwriter=Utf8StreamReader,
+                       streamreader=Utf8StreamReader,
+                       streamwriter=Utf8StreamWriter,
                )
 
                for alias in ('utf_8', 'u8', 'utf', 'utf8', 'utf8_ucs2', 'utf8_ucs4'):