Bug with formatting of string

This commit is contained in:
Anton Hvornum 2022-02-09 15:28:58 +01:00
parent 83c663fcb2
commit c3caea51cc
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 7 additions and 5 deletions

View File

@ -283,15 +283,17 @@ class SysCommandWorker:
self.make_sure_we_are_executing()
if self.child_fd:
written_data = os.write(self.child_fd, data + (b'\n' if line_ending else b''))
os.fsync(self.child_fd)
with open('debug_write.txt', 'a') as silent_output:
silent_output.write(f"Writing to {self.child_fd}")
if self.child_fd:
written_data = os.write(self.child_fd, data + (b'\n' if line_ending else b''))
os.fsync(self.child_fd)
with open('debug_write.txt', 'a') as silent_output:
written_data_string = data + (b'\n' if line_ending else b'')
silent_output.write(f"Wrote {[written_data_string]}\n")
return written_data
return written_data
return 0