Added a new feature: on_output in sys_command. Passing a on_output function to sys_command forces it to send each output block to the callback. Useful to create progressbars etc.
This commit is contained in:
parent
93780ba888
commit
3c0963a0a1
|
|
@ -313,6 +313,9 @@ class sys_command():#Thread):
|
|||
print(self.cmd[0], 'gave:', output.decode('UTF-8'))
|
||||
log(self.cmd[0],'gave:', output.decode('UTF-8'), origin='spawn', level=4)
|
||||
|
||||
if 'on_output' in self.kwargs:
|
||||
self.kwargs['on_output'](self, output)
|
||||
|
||||
lower = output.lower()
|
||||
broke = False
|
||||
if 'events' in self.kwargs:
|
||||
|
|
|
|||
Loading…
Reference in New Issue