Fix decoding on "get_cnf --json"
authorJuliana Rodrigueiro <juliana.rodrigueiro@intra2net.com>
Thu, 11 Mar 2021 13:37:51 +0000 (14:37 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 25 Mar 2021 09:52:29 +0000 (10:52 +0100)
commit35072357d8294230fad5633c6643a7a839eb89c6
treeebbec09c4eba59db4709af54d19be1b64df81784
parente251b602a35c28558f5d052b41d9051007b58851
Fix decoding on "get_cnf --json"

The get_cnf command returns its output already in utf-8 when the
json switch is enabled. However the module cnfvar assumes that
raw data is always latin1, which is the case most of the time
when using arnied commands. This patch decodes the data, as we
know it is utf-8, before calling read_cnf_json.

Another caveat however, when the language locale is set to "C"
(which is currently the standard for avocado) before vm sessions
are started, every output (latin1 or utf-8) containing non ascii
characters will have those characters omitted (not garbled,
simply missing).
src/arnied_wrapper.py