Run(root)

This commit is contained in:
jpic 2020-08-02 06:50:33 +02:00
parent 189c4c3856
commit 77f0d1f67b

View File

@ -1,11 +1,15 @@
class Run: class Run:
def __init__(self, cmd): def __init__(self, cmd, root=False):
self.cmd = cmd self.cmd = cmd
self.root = root
async def __call__(self, target): async def __call__(self, target):
self.proc = await target.exec(self.cmd) if self.root:
self.proc = await target.rexec(self.cmd)
else:
self.proc = await target.exec(self.cmd)
def __str__(self): def __str__(self):
return f'Run({self.cmd})' return f'Run({self.cmd})'