관리-도구
편집 파일: cluserextselect.cpython-37.pyc
B �v6d�9 � @ s~ d dl mZ d dl mZ d dl mZ d dlZddlmZ ddlmZ ddl m Z dd lmZ dd l mZ G dd� dee�ZdS ) � )�absolute_import)�print_function)�divisionN� )�ClExtSelect)�ClUserSelect)�ClSelectExcept)�clprint)�apply_for_at_least_one_userc @ s� e Zd ZdZd+dd�Zd,dd�Zd-dd �Zd d� Zdd � Zdd� Z d.dd�Z dd� Zd/dd�Zdd� Z dd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zee�Zed%d&� �Zd'd(� Zd)d*� ZdS )0�ClUserExtSelectzalt_php.ini�phpNc C s$ t �| ||� d | _g | _g | _d S )N)r �__init__�_alt_extensions�_user_extensions� _conflicts)�self�item�exclude_pid_list� r �I/opt/alt/python37/lib/python3.7/site-packages/clselect/cluserextselect.pyr s zClUserExtSelect.__init__c C sP | � |� |dkr | �|�d }|dkr2t�|��ttdd� t| �||����S )z� Returns enabled user extensions for a version as a tuple @param user: string @param version: string @return: tuple Nr �nativec S s | dfS )NTr )�ir r r �<lambda>) � z9ClUserExtSelect.list_enabled_extensions.<locals>.<lambda>)�_check_user_in_cagefs�get_versionr �UnableToGetExtensions�tuple�map�sorted�_get_enabled_extensions)r �user�versionr r r �list_enabled_extensions s z'ClUserExtSelect.list_enabled_extensionsc C s� | � |� |dkr | �|�d }|dkr2t�|��t| �||��}t| �|��}t| �|��}||B }g }x<t|�D ]0}d} ||kr�d} n||kr�d} |� || f� qtW t |�S )z� Returns as a tuple all user extensions for a version, marking enabled and disabled ones @param user: string @param version: string @return: tuple Nr r FT)r r r r �setr � _get_builtins�_get_all_extensionsr �appendr ) r r! r"