diff options
author | Six <unknown> | 2011-05-03 12:49:41 -0400 |
---|---|---|
committer | Six <unknown> | 2011-05-03 12:49:41 -0400 |
commit | 884efc5bc30c0ec00dbff99e9b17b1f35cd1b31d (patch) | |
tree | fcc8bbeba76955a6cb7c4e378895b853303162dc | |
parent | 3fe643059112c5c0dec363f3f8dea64f9140ff78 (diff) | |
download | d2-884efc5bc30c0ec00dbff99e9b17b1f35cd1b31d.tar.bz2 d2-884efc5bc30c0ec00dbff99e9b17b1f35cd1b31d.tar.xz d2-884efc5bc30c0ec00dbff99e9b17b1f35cd1b31d.zip |
better filter to limit real data from ldap
-rw-r--r-- | lib/d2/bin/d2_data_merge.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/d2/bin/d2_data_merge.py b/lib/d2/bin/d2_data_merge.py index c0c7de9..01c1c5e 100644 --- a/lib/d2/bin/d2_data_merge.py +++ b/lib/d2/bin/d2_data_merge.py | |||
@@ -70,10 +70,11 @@ class LdapData(object): | |||
70 | self.FILTER, | 70 | self.FILTER, |
71 | self.ATTRS) | 71 | self.ATTRS) |
72 | for row in data: | 72 | for row in data: |
73 | out[row[0]] = {} | 73 | if row[1].get('physicalDeliveryOfficeName'): |
74 | out[row[0]]['dn'] = row[0] | 74 | out[row[0]] = {} |
75 | for key, val in row[1].items(): | 75 | out[row[0]]['dn'] = row[0] |
76 | out[row[0]][key] = val[0] | 76 | for key, val in row[1].items(): |
77 | out[row[0]][key] = val[0] | ||
77 | return out | 78 | return out |
78 | 79 | ||
79 | 80 | ||