Antoine Pitrou <pit...@free.fr> added the comment:

+        if not isinstance(fileobject, StringIO):
+            encoding = codecs.lookup(fileobject.encoding).name

IMO you should try to get the "encoding" attribute and silence the 
AttributeError instead.

(also, I'm not even sure why you're adding this check)

----------
nosy: +pitrou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12112>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to