Fix corner case of undefined text when using --no-pretty

This commit is contained in:
Paul Gauthier 2023-08-08 07:00:21 -03:00
parent 94e5aeac62
commit 3c0720ff1c

View file

@ -672,11 +672,11 @@ class Coder:
if text:
self.partial_response_content += text
except AttributeError:
pass
text = None
if self.pretty:
self.live_incremental_response(live, False)
else:
elif text:
sys.stdout.write(text)
sys.stdout.flush()
finally: