12 Mar
2018
12 Mar
'18
12:56 p.m.
For interest only, here is the patch required to make -o rhv-upload work with Python 2 (for RHEL 7). I don't think we want this upstream. A couple of remarks: * It's supposed to be possible to add ‘coding: utf-8’ to the top of .py files to make Python 2 accept that the file is UTF-8 (otherwise it gives an error on loading). However I added this and it didn't appear to make any difference, I still had to replace the Unicode quotes with ASCII ones, so I don't know what's going on there. * The ‘byteify’ function is a bit of a hack, but required here because the Python 2 json library returns unicode objects where all the rest of the libraries are expecting str. Not needed in Python 3 of course. Rich.