Since SysCommand() wraps SysCommandWorker(), but SysCommand() doesn't use contexts, we have to flush the output manually here to avoid newlines not being before the next output.

This commit is contained in:
Anton Hvornum 2021-05-22 19:58:40 +02:00
parent e5c8a18752
commit f2e7b1440a
1 changed files with 4 additions and 0 deletions

View File

@ -333,6 +333,10 @@ class SysCommand:
while self.session.ended is None:
self.session.poll()
if self.peak_output:
sys.stdout.write('\n')
sys.stdout.flush()
except SysCallError:
return False