Fix deploy_logs unicode handling for Python 2 & 3 86/15886/1 v0.25.0
authorEric Ball <eball@linuxfoundation.org>
Thu, 13 Jun 2019 18:25:39 +0000 (11:25 -0700)
committerEric Ball <eball@linuxfoundation.org>
Thu, 13 Jun 2019 19:13:41 +0000 (12:13 -0700)
commit8e4cfd42d3fbe974c98aebb52d491c8d84050e03
tree4f4bcc3b96ecd3488e9b03907a028eba5a31d361
parentbf148382ba9b04d592311ea2cb99f137a557f79f
Fix deploy_logs unicode handling for Python 2 & 3

six.text_type will always return a utf-8 encoded string, while
str.encode will return a bytes object in Python 3. io.open is
used to ensure that the file is being opened for utf-8 writing in
Python 2. decode('utf-8') is used on the requests response due to
how requests encodes unicode responses.

Change-Id: If58f8a3b9617f0be4effc58414d22f0cf09946cb
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
lftools/deploy.py
releasenotes/notes/no-encode-py3-44307e6fd97c2d0c.yaml [new file with mode: 0644]