Your IP : 18.223.171.83
3
l�_� � @ s4 d dl mZmZmZ d dlmZ G dd� de�ZdS )� )�absolute_import�division�print_function)�utilsc @ sJ e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zedd� �Z e
jd
�ZdS )�ObjectIdentifierc C s� || _ | j jd�}g }x^|D ]V}yt|d�}W n" tk
rP td| j ��Y nX |dk rhtd| j ��|j|� qW t|�dk r�td| j ��|d dkr�td| j ��|d dk r�|d d
kr�td| j ��d S )N�.�
z%Malformed OID: %s (non-integer nodes)r z*Malformed OID: %s (negative-integer nodes)� z0Malformed OID: %s (insufficient number of nodes)z2Malformed OID: %s (first node outside valid range)� �( z3Malformed OID: %s (second node outside valid range))�_dotted_string�split�int�
ValueError�append�len)�self�
dotted_stringZnodesZintnodesZnodeZ
node_value� r �/usr/lib64/python3.6/_oid.py�__init__ s6
zObjectIdentifier.__init__c C s t |t�stS | j|jkS )N)�
isinstancer �NotImplementedr )r �otherr r r �__eq__5 s
zObjectIdentifier.__eq__c C s
| |k S )Nr )r r r r r �__ne__; s zObjectIdentifier.__ne__c C s dj | j| j�S )Nz#<ObjectIdentifier(oid={}, name={})>)�formatr �_name)r r r r �__repr__>