Skip to content
This repository was archived by the owner on Sep 20, 2018. It is now read-only.
This repository was archived by the owner on Sep 20, 2018. It is now read-only.

Consider sudo transports #44

@alfredodeza

Description

@alfredodeza

Because we don't want to be cluttering all the commands that we are passing around with sudo (all our commands need sudo) we are currently doing something like this:

class SshSudoTransport(object):
    @staticmethod
    def Popen(command, *a, **kw):
        command = ['sudo'] + command
        return pushy.transport.ssh.Popen(command, *a, **kw)


pushy.transports['ssh+sudo'] = SshSudoTransport

Would you consider adding sudo transports to pushy ? We do this for ssh and for local commands as well, but for brevity I am showing the ssh one.

If so, I would be more than happy to send a pull request.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions