diff options
author | Lucas Abel <22837557+uael@users.noreply.github.com> | 2023-03-02 09:07:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 09:07:39 -0800 |
commit | 63699380829c94f636e2bd27680e761a37768628 (patch) | |
tree | 4577681d587655b6ed3efca425ec86979401b87d | |
parent | caf37d004aea640011dc641857e52423b6c8442a (diff) | |
download | mobly-63699380829c94f636e2bd27680e761a37768628.tar.gz |
record: emit explicit end when appending to summary (#872)
Since the `yaml` summary file is appended during the process, a reader
is able to handle any new record as soon as they have been written. But
it may read incomplete `yaml` data, for example on Linux there is no
guaranty that a single write to file will be available as one read.
By explicitly emitting the end marker to the record, the reader may now
be able to read the complete `yaml` data before processing it.
-rw-r--r-- | mobly/records.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mobly/records.py b/mobly/records.py index 69f1f9d..b77817c 100644 --- a/mobly/records.py +++ b/mobly/records.py @@ -156,6 +156,7 @@ class TestSummaryWriter: yaml.safe_dump(new_content, f, explicit_start=True, + explicit_end=True, allow_unicode=True, indent=4) |