summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2019-12-09 09:27:57 -0500
committerGitHub <noreply@github.com>2019-12-09 09:27:57 -0500
commit8e79501adca5df505436e942fff15c76916c0de1 (patch)
tree1c9a8e95042e773d12c4d9c1c5817d3b34d7d482
parent4e2ee3da298a540fa2599b333ffefd5c0ef5bcc5 (diff)
parent0bbad5dc2b95cf438d158846ce7a125c75c2b5a0 (diff)
downloadsubunit-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.py2
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)