Exemple #1
0
 def r_popen2(self, command, **kwargs):
     """Run command on node."""
     return helpers.r_popen2(self._get_server(),
                 command % self.get_attrs(), **kwargs)
Exemple #2
0
def executor(server, func, user):
    if helpers.is_local(server):
        if helpers.is_current_user(helpers.get_user(user)):
            return func
    stdin, input = helpers.r_popen2(server, "/usr/bin/env python", user=user)
    return functools.partial(executor_helper, stdin, input, func)