ok
Direktori : /opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/clpwd.cpython-37.pyc |
B E!wdJ � @ s� d dl mZ d dl mZ d dl mZ d dlZd dlZd dlZd dlmZ ddl m Z G dd � d �Zddd�Zed d� �Z dd� Zddd�ZdS )� )�absolute_import)�division)�print_functionN)�contextmanager� )�FormattedExceptionc @ s� e Zd ZdZG dd� de�Zddd�Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zddd�ZdS ) �ClPwdz/etc/login.defsc s e Zd Z� fdd�Z� ZS )zClPwd.NoSuchUserExceptionc s( t tj| �jdd|id�f|�|� d S )NzNo such user (%(user)s)�user)�message�context)�superr �NoSuchUserException�__init__)�selfr �args�kwargs)� __class__� �?/opt/alt/python37/lib/python3.7/site-packages/clcommon/clpwd.pyr s z"ClPwd.NoSuchUserException.__init__)�__name__� __module__�__qualname__r � __classcell__r r )r r r s r Nc C s8 i | _ i | _i | _i | _|d kr.| �d�| _n|| _d S )Ni� )� _user_key_map�_uid_key_map�_user_full_map� _uid_full_map�get_sys_min_uid�_min_uid)r Zmin_uidr r r r s zClPwd.__init__c C s | � � | jS )N)�_load_passwd_databaser )r r r r � get_user_dict* s zClPwd.get_user_dictc C s | � � | jS )N)r r )r r r r �get_uid_dict. s zClPwd.get_uid_dictc C s | � � | jS )N)r r )r r r r �get_user_full_dict2 s zClPwd.get_user_full_dictc C s | � � | jS )N)r r )r r r r �get_uid_full_dict6 s zClPwd.get_uid_full_dictc C s0 y| � � | S tk r* t�|��Y nX dS )z* Return pw_entry for user N)r"