# reading was successful, attempt to parse what we got
try:
+ # The output from "get_cnf -j" is already utf-8. This contrast with
+ # the output of "get_cnf" (no json) which is latin1.
+ if isinstance(raw, bytes):
+ raw = raw.decode("utf-8")
cnf = cnfvar.read_cnf_json(raw)
except TypeError as exn:
log.info("error \"%s\" parsing result of \"%s\"", exn, cmd_line)