pyldb: Fixes and Python3 compat for Dn component accessors
authorPetr Viktorin <pviktori@redhat.com>
Fri, 21 Aug 2015 08:10:28 +0000 (10:10 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 5 Nov 2015 17:04:24 +0000 (18:04 +0100)
commitdd7baa2ae2f98d5c1e82fa97f223925025da5ca0
treed437b4a63aea4daf45674c7703e6128308cab324
parenta4d9c87cedeacbf3b4bbb5214a5b76e0def03540
pyldb: Fixes and Python3 compat for Dn component accessors

Use "s#"/"z#" argument specifiers in set_component and
set_extended_component instead of converting strings manually.
(Under Python 3, This means both text strings and bytes are accepted.)

Raise error on set_component(None), instead of crashing.

Return text strings from get_{extended}_component under Python 3.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/ldb/pyldb.c