samba-tool: Rework ldap attribute fetch in classicupgrade for missing attributes
authorAndrew Bartlett <abartlet@samba.org>
Sun, 11 Nov 2012 00:35:02 +0000 (11:35 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 11 Nov 2012 13:05:08 +0000 (00:05 +1100)
commitb4d8629f511005540cb1fbbbe9abfb278c064ba2
tree447c440aa6ff47636aefcfdab5f8db9558bfb872
parentc06d602d7f3b8d3da972071a1b5392c6b145133f
samba-tool: Rework ldap attribute fetch in classicupgrade for missing attributes

Is is not required that these additional attributes be filled in, so
catch KeyError in both the nsswitch and ldap backend case.

We rework get_posix_attr_from_ldap_backend() so it raises KeyError
rather than trying to return None, and does not ignore other errors.

Andrew Bartlett

Tested-by: Chirana Gheorghita Eugeniu Theodor <office@adaptcom.ro>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
source4/scripting/python/samba/upgrade.py