pushyrpc / pushy

Easy-as RPC. Zero-server RPC for Python and Java.
http://github.com/pushyrpc/pushy
45 stars 18 forks source link

Consider `sudo` transports #44

Open alfredodeza opened 11 years ago

alfredodeza commented 11 years ago

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 commented 11 years ago

@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.