tamentis / rpdb

Wrapper around pdb allowing remote debugging via netcat or telnet. This is especially useful in a Tomcat/Jython environment where little debugging tools are available.
BSD 2-Clause "Simplified" License
130 stars 44 forks source link

Close #21: Fix encoding and isatty errors #24

Closed Akrog closed 6 years ago

Akrog commented 6 years ago

On commit 9c9d4f487c81bd5c69a06d636a5121dcf00ba246 we added a wrapper to provide missing parameters (ie: encoding) in the object returned by makefile, unfortunately this didn't resolve all problems, as there are some cases, like in method oslo_utils.encodeutils.safe_decode where when accessing sys.stdin.encoding we would still get an error:

AttributeError: "'_fileobject' object has no attribute 'encoding'"

This patch fixes this issue and allows us to set the encoding when instantiating the Rpdb object.

The way this has been fixed depends on the Python version: