diff options
author | Matthew Treinish <mtreinish@kortar.org> | 2019-12-09 09:27:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 09:27:57 -0500 |
commit | 8e79501adca5df505436e942fff15c76916c0de1 (patch) | |
tree | 1c9a8e95042e773d12c4d9c1c5817d3b34d7d482 | |
parent | 4e2ee3da298a540fa2599b333ffefd5c0ef5bcc5 (diff) | |
parent | 0bbad5dc2b95cf438d158846ce7a125c75c2b5a0 (diff) | |
download | subunit-git-8e79501adca5df505436e942fff15c76916c0de1.tar.gz |
Merge pull request #37 from FedericoRessi/fix-StreamResultToBytes-chunked-writing
Check written bytes are not None before summing them to offset
-rw-r--r-- | python/subunit/v2.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/subunit/v2.py b/python/subunit/v2.py index 254617c..7f4842e 100644 --- a/python/subunit/v2.py +++ b/python/subunit/v2.py @@ -223,6 +223,8 @@ class StreamResultToBytes(object): offset = 0 while offset < datalen: written = self.output_stream.write(view[offset:]) + if written is None: + break offset += written else: self.output_stream.write(data) |