python/samba/gp_parse: PY2/PY3 compat changes for __init__.py
authorNoel Power <noel.power@suse.com>
Wed, 5 Sep 2018 11:36:00 +0000 (12:36 +0100)
committerNoel Power <npower@samba.org>
Mon, 5 Nov 2018 19:05:23 +0000 (20:05 +0100)
commit0934fc14ef6ed94a100caa8a622b370d41bc1182
tree1b19b1fff36bc054c7aa2e2e53ce63eb69a4d6b4
parent27df4f002a594dbb2f2a38afaccf3e22f19818e1
python/samba/gp_parse: PY2/PY3 compat changes for __init__.py

Fixes.

1) sorting of xml.etree.ElementTree.Element, in PY2 sort
   seems to sort lists of these. In PY3 this no longer works.
   Choosing tag as the sort key for py3 so at least in python3
   there is a consistent sort (probably won't match how it is
   sorted in PY2 but nothing seems to depend on that)
2) md5 requires bytes
3) tostring returns bytes in PY3, adjust code for that

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/gp_parse/__init__.py