Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
ldap
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/ldap/modlist.pyc
mņ #O@c @ sF d Z d Z d k Z d k Z d Z d d Z d d d Z d S( s> ldap.modlist - create add/modify modlist's (c) by Michael Stroeder <michael@stroeder.com> See http://python-ldap.sourceforge.net for details. $Id: modlist.py,v 1.14 2004/01/22 22:30:59 stroeder Exp $ Python compability note: This module is known to work with Python 2.0+ but should work with Python 1.5.2 as well. s 0.1.1Nc C s% h } x | D] } d | | <q W| S( sN return a dictionary with all items of l being the keys of the dictionary N( t dt lt it None( R R R ( ( t0 /usr/lib/python2.4/site-packages/ldap/modlist.pyt list_dict s c C s t t t i | p g } g } xl | i D]^ } | i t i | o q2 n t d | | } | o | i | | | f q2 q2 W| S( s5 Build modify list for call of method LDAPObject.add()c C s | d j S( N( t xR ( R ( ( R t <lambda>' s N( R t mapt stringt lowert ignore_attr_typest modlistt entryt keyst attrtypet has_keyt filtert attrvaluelistt append( R R R R R ( ( R t addModlist s i c C s¢ t t t i | p g } g } h } x' | i D] } | | t i | <q8 Wxź| i D]Ü} t i | } | i | o qb n t d | | } | i | o3 | i | | g } t d | } | | =n g } | o$ | o | i t i | | f qb | oņ | oė t | t | j } | p t | } t | } g } x) | D]! } | i | p d } PqkqkWg } | p0 x- | D]! } | i | p d } Pq¤q¤WqŃn | o6 | i t i | d f | i t i | | f q>qb | o% | o | i t i | d f qb qb W| pU xR | i D]@ } | i | o qVn | | } | i t i | d f qVWn | S( s; Build differential modify list for calling LDAPObject.modify()/modify_s() old_entry Dictionary holding the old entry new_entry Dictionary holding what the new entry should be ignore_attr_types List of attribute type names to be ignored completely ignore_oldexistent If non-zero attribute type names which are in old_entry but are not found in new_entry at all are not deleted. This is handy for situations where your application sets attribute value to '' for deleting an attribute. In most cases leave zero. c C s | d j S( N( R R ( R ( ( R R K s c C s | d j S( N( R R ( R ( ( R R N s i N( R R R R R R t attrtype_lower_mapt old_entryR t at new_entryR t attrtype_lowerR R t new_valuet gett old_valueR t ldapt MOD_ADDt lent replace_attr_valuet old_value_dictt new_value_dictt delete_valuest vt add_valuest MOD_DELETER t ignore_oldexistent( R R R R' R R! R R R"