Skip to content

The little Stdout class in PromptToolkitSSHSession is missing an encoding property #1209

Closed
@JoshHeitzman

Description

@JoshHeitzman

prompt_toolkit.output.vt100.Vt100_Output.encoding method expects a the instance it is holding in its self.stdout attribute to have an encoding attribute/property. However, the prompt_toolkit.contrib.ssh.PromptToolkitSSHSession.init method has a little Stdout class that lacks such an attribute/property and Vt100_Output will have an instance of that little Stdout class in the ssh server case.

I worked around this by adding this property to that little Stdout class:
@Property
def encoding(s):
return self._chan._orig_chan.get_encoding()[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions