def _ldap_call(self,func,*args,**kwargs):
    self._ldap_object_lock.acquire()
    if __debug__:
      if self._trace_level>=1:# and func.__name__!='result':
        self._trace_file.write('*** %s - %s (%s,%s)\n' % (
          self._uri,
          self.__class__.__name__+'.'+func.__name__,
          repr(args),repr(kwargs)
        ))
        if self._trace_level>=3:
          traceback.print_stack(limit=self._trace_stack_limit,file=self._trace_file)
    try:
      try:
        result = func(*args,**kwargs)
        if __debug__ and self._trace_level>=2:
          if func.__name__!="unbind_ext":
            diagnostic_message_success = self._l.get_option(ldap.OPT_DIAGNOSTIC_MESSAGE)
          else:
            diagnostic_message_success = None
      finally:
        self._ldap_object_lock.release()
    except LDAPError,e:
      if __debug__ and self._trace_level>=2:
        self._trace_file.write('=> LDAPError - %s: %s\n' % (e.__class__.__name__,str(e)))
      raise
    else:
      if __debug__ and self._trace_level>=2:
        if not diagnostic_message_success is None:
          self._trace_file.write('=> diagnosticMessage: %s\n' % (repr(diagnostic_message_success)))
        if result!=None and result!=(None,None):
          self._trace_file.write('=> result: %s\n' % (repr(result)))
    return result
Quick and dirty hack to fix change_view and delete_view; they use
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/python-ldap-2.3.13/Lib/ldap/ldapobject.py/SimpleLDAPObject._ldap_call--crossover with--dataset/ETHPy150Open callowayproject/django-categories/categories/editor/tree_editor.py/TreeEditorQuerySet.get