accept both bytes and str for cnfvar readers
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 7 Feb 2019 14:25:04 +0000 (15:25 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 7 Feb 2019 15:50:34 +0000 (16:50 +0100)
commit96eb61d7b5e2d7da8804a4f49eebd5ca46aeefd3
tree226a7884254d40cb047602de5034954395957b87
parentee30d321dd002cff2cd6d0f51fe83dc0b003db9f
accept both bytes and str for cnfvar readers

Make both the CNF format and the JSON readers handle bytes and
str transparently.

(Note there is still a deplorable asymmetry in the routines such
that the JSON path will convert to *str* whereas the CNF part,
assuming single-byte encoded data, will convert to *bytes*. This
is necessary for compatibility reasons until the Intranator gets
a more recent Python interpreter.)
src/cnfvar.py