|
36 |
import os |
36 |
import os |
37 |
import cPickle |
37 |
import cPickle |
38 |
import types |
38 |
import types |
|
|
39 |
import collections |
39 |
import random |
40 |
import random |
40 |
import traceback |
41 |
import traceback |
41 |
import copy |
42 |
import copy |
|
1061 |
else: |
1062 |
else: |
1062 |
equal = compare[0] == compare[1] |
1063 |
equal = compare[0] == compare[1] |
1063 |
if not equal: |
1064 |
if not equal: |
1064 |
ucs_object[ucs_key] = value |
1065 |
# This is deduplication of LDAP attribute values for S4 -> UCS. |
|
|
1066 |
# It preserves ordering of the attribute values which is |
1067 |
# important for the handling of `con_other_attribute`. |
1068 |
if isinstance(value, list): |
1069 |
ucs_object[ucs_key] = list(collections.OrderedDict.fromkeys(value)) |
1070 |
else: |
1071 |
ucs_object[ucs_key] = value |
1072 |
|
1065 |
ud.debug(ud.LDAP, ud.INFO, "set key in ucs-object: %s" % ucs_key) |
1073 |
ud.debug(ud.LDAP, ud.INFO, "set key in ucs-object: %s" % ucs_key) |
1066 |
else: |
1074 |
else: |
1067 |
ud.debug(ud.LDAP, ud.WARN, '__set_values: no ucs_attribute found in %s' % attributes) |
1075 |
ud.debug(ud.LDAP, ud.WARN, '__set_values: no ucs_attribute found in %s' % attributes) |
1068 |
- |
|
|