On Tue, May 24, 2022 at 9:50 AM Adi Roiban <adiroi...@gmail.com> wrote:

> On Tue, 24 May 2022 at 14:35, Peter Westlake <peter.westl...@pobox.com>
> wrote:
> >
> > I'm setting up a manhole with twisted.conch.manhole, and it works, but
> gives this warning:
> >
> > Can't handle environment variables for SSH avatar
> > <twisted.conch.manhole_ssh.TerminalUser object at 0x7fef33174f60>:
> > <twisted.conch.manhole_ssh.TerminalSession object at
> > 0x7fef33174fd0> does not provide ISessionSetEnv interface. It
> > should be decorated with @implementer(ISession, ISessionSetEnv) to
> > support env variables.
> >
> > I've looked at the release notes about #9315, but can't see where in my
> code to add @implementer. Here's the code:
> >
>
> Hi Peter,
>
> I don't think there is anything wrong with your code.
>
> The issue is with manhole supoprt for SSH -
> twisted.conch.manhole_ssh.TerminalSession
>
> You can ignore it, or try to send a fix for
>
> https://github.com/twisted/twisted/blob/trunk/src/twisted/conch/manhole_ssh.py#L73
> to implement or ignore the setEnv
> command.
>
> I guess that for manhole just ignoring the setEnv requests is ok.
> I am not sure what use case you can have for remote environment
> control via manhole.
>
>
Conch shouldn't even emit this warning.  The fallback behavior of ignoring
the env request is fine.  There's no reason to bother people about their
session not implementing this interface if they don't need to support
environment variables.

A good PR would be one that just deletes the log.warn call.

Jean-Paul
_______________________________________________
Twisted mailing list -- twisted@python.org
To unsubscribe send an email to twisted-le...@python.org
https://mail.python.org/mailman3/lists/twisted.python.org/
Message archived at 
https://mail.python.org/archives/list/twisted@python.org/message/7CNSCERZOEIVDWT2NJHAYVONIDRQMA72/
Code of Conduct: https://twisted.org/conduct

Reply via email to