Skip to content

Commit b74a974

Browse files
committed
Flush writes to the logfile before calling the subprocess
This should avoid out-of-order output
1 parent 3ae50af commit b74a974

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: scripts/update-all-remote-wn-clients

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def call_updater(cfg, section, updater_script, log_dir, dry_run=False):
7575
b"Started at %s\nUser: %s\nCommand: %r\n\n"
7676
% (datetime.datetime.now(), local_user, cmd)
7777
)
78+
log_file.flush()
7879
proc = Popen(
7980
["sudo", "-H", "-u", local_user] + cmd,
8081
stdout=log_file,

0 commit comments

Comments
 (0)