Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Python API compatible with Python 2 & 3
Re-factor the Python 2 Livestatus library to work under both 2/3: * Replace some py2-only idioms and fix some errors like trying to access `.keys()` on a list. * Let all literal strings be unicode on both py2/3 (`from __future__ import unicode_literals`). This way, the modules code internally works with unicode stings (`unicode` on py2, `str` on py3) and converts to byte strings when writing to socket. * API methods take either unicode strings or byte (`str` on py2, `bytes` on py3) as input. Signed-off-by: Aksel Sjögren <asjogren@itrsgroup.com>
- Loading branch information