File: //proc/self/root/usr/lib64/python3.6/site-packages/gssapi/__pycache__/names.cpython-36.pyc
3
�O[/3 � @ s� d dl Z d dlmZ d dlmZ d dlmZ d dlmZ e j rPd dl
mZmZ nd dl
mZmZ ejd�Zejd�ZG d d
� d
ej�ZG dd� de�ZdS )
� N)�names)�NameType)�named_tuples)�_utils)�MutableMapping�IterableZrfc6680Zrfc6680_comp_oidc s� e Zd ZdZdZd)� fdd� Zd*dd�Zd d
� Zdd� Zd
d� Z dd� Z
edd� �Zdd� Z
dd� Zdd� Zd+dd�Zdd� Zdd� Zdd � Zd!d"� Zed#d$� �Zed%d&� �Zed'd(� �Z� ZS ),�Namea� A GSSAPI Name
This class represents a GSSAPI name which may be used with and/or returned
by other GSSAPI methods.
It inherits from the low-level GSSAPI :class:`~gssapi.raw.names.Name`
class, and thus may used with both low-level and high-level API methods.
This class may be pickled and unpickled, as well as copied.
The :func:`str` and :func:`bytes` methods may be used to retrieve the
text of the name.
Note:
Name strings will be automatically converted to and from unicode
strings as appropriate. If a method is listed as returning a
:class:`str` object, it will return a unicode string.
The encoding used will be python-gssapi's current encoding, which
defaults to UTF-8.
� _attr_objNFc s� |d k r||rlt d krtd��td k r\tj|tj�}tj|dd�}|jtjkrjtj|tj �}qztj|tj �}q�tj|tj �}n8t
|tj�r�|}n&t
|tj
�r�|jtj� �}tj||�}tt| �j| |�S )NzSYour GSSAPI implementation does not support RFC 6680 (the GSSAPI naming extensions)T)� name_type)�
rname_rfc6680�NotImplementedError�rname_rfc6680_comp_oid�rnameZimport_namer Zcomposite_export�display_namer
�export�
isinstancer �six� text_type�encoder �
_get_encoding�super�__new__)�cls�baser
�token� compositeZ base_nameZ
displ_name)� __class__� �/usr/lib64/python3.6/names.pyr + s&