[ldapfeed] don't crash if entity is None. Closes (superficialy) #2341266
--- a/sobjects/ldapparser.py Wed May 02 10:13:39 2012 +0200
+++ b/sobjects/ldapparser.py Thu May 03 15:45:58 2012 +0200
@@ -43,7 +43,7 @@
for userdict in source._search(self._cw, source.user_base_dn,
source.user_base_scope, searchstr):
entity = self.extid2entity(userdict['dn'], 'CWUser', **userdict)
- if not self.created_during_pull(entity):
+ if entity is not None and not self.created_during_pull(entity):
self.notify_updated(entity)
attrs = self.ldap2cwattrs(userdict)
self.update_if_necessary(entity, attrs)