← Back to team overview

subunit-dev team mailing list archive

Writing Content to a file

 

Hi,

I have a subunit stream with some logs embedded in it as 'Content' types. I
(think I) need to write these to a file in order to include them in a POST
request to a service that I want to upload them to. The issue that I have
is that it appears to be non-trivial to do this, which is puzzling as they
represent files. For text files I can call as_text().encode('utf-8') or
what have you, but for images as_text isn't supported so I appear to be
left with casting to a string which is kind of horrible. Is there something
I'm completely missing here?

Thanks,

Follow ups