From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: network: decode command output to native string ......................................................................
Patch Set 25:
(1 comment)
https://gerrit.ovirt.org/#/c/77724/25/lib/vdsm/network/cmd.py File lib/vdsm/network/cmd.py:
PS25, Line 62: 'utf-8'
python -c "print('\xe3')"
My point is that
'\xe3'.decode('utf8') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xe3 in position 0: unexpected end of data
if an app prints this bytestream, the consumer should be aware that this is not utf8.
I don't think we should handle this right now. You can keep this py3 bug if you add a failing test for it.
In one point in the future, we can differentiate between consumers that need bytes to those needing unicode.
vdsm-patches@lists.fedorahosted.org