o
    j                     @   s`   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 dd	lmZ G d
d deZdS )
    )Integer   )LDAPExtensionError   )ExtendedOperation)LDAPDN)decoder)safe_dnc                   @   s&   e Zd Zdd ZdddZdd ZdS )	PartitionEntryCountc                 C   s   d| _ d| _t | _d| _d S )Nz2.16.840.1.113719.1.27.100.13z2.16.840.1.113719.1.27.100.14entry_count)request_nameresponse_namer   request_valueresponse_attribute)self r   /root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/ldap3/extend/novell/partition_entry_count.pyconfig$   s   
zPartitionEntryCount.configNc                 C   s*   t | || |jrt|}t|| _d S N)r   __init__check_namesr
   r   r   )r   
connectionpartition_dncontrolsr   r   r   r   *   s   zPartitionEntryCount.__init__c                 C   sT   | j }ztj|t d\}}t|| jd< W n ty!   tdw |r(tdd S )N)asn1Specr   zunable to decode substratezunknown substrate remaining)decoded_responser	   decoder   intresult	Exceptionr   )r   	substratedecodedr   r   r   populate_result0   s   z#PartitionEntryCount.populate_resultr   )__name__
__module____qualname__r   r   r#   r   r   r   r   r   #   s    
r   N)__doc__pyasn1.type.univr   core.exceptionsr   	operationr   protocol.rfc4511r   
utils.asn1r	   utils.dnr
   r   r   r   r   r   <module>   s    