Example #1
0
    def _prepare_command(self, *command):
        env = ['env', '-i'] + [
            executil.mkarg(name + "=" + val)
            for name, val in self.environ.items()
        ]

        command = executil.fmt_command(*command)
        return ("chroot", self.path, 'sh', '-c', " ".join(env) + " " + command)
Example #2
0
def fmt_internal_command(command, *args):
    internal_command = [ realpath(__file__), command ] + list(args)
    return fmt_command("python", *internal_command)
Example #3
0
    def _prepare_command(self, *command):
        env = ['env', '-i' ] + [ executil.mkarg(name + "=" + val)
                                 for name, val in self.environ.items() ]

        command = executil.fmt_command(*command)
        return ("chroot", self.path, 'sh', '-c', " ".join(env) + " " + command)