Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-03-15 19:05:55 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-03-15 19:05:55 +0000
commit3c0963a0a10116342c75c11a5971df99e2e04a7b (patch)
treeba299100abade0b89d01f1543c900cafeddd9257 /archinstall.py
parent93780ba8881495c0c2b8ca509973411d2b11ae6c (diff)
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.
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/archinstall.py b/archinstall.py
index 54cb391e..dfc2926f 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -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: