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

Consider sudo transports #44

Open
alfredodeza opened this issue Jul 24, 2013 · 1 comment
Open

Consider sudo transports #44

alfredodeza opened this issue Jul 24, 2013 · 1 comment

Comments

@alfredodeza
Copy link
Contributor

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!

@axw
Copy link
Member

axw commented Jul 25, 2013

@alfredodeza I've not had any requests for this, so not right now. I'll leave this open and revisit if enough (any?) others show interest. Right now I have no need for it, nor any time to test it. Thanks for the offer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants