관리-도구
편집 파일: selector_manager.cpython-311.pyc
� %�4g� � � � d dl mZ d dl mZ d dl mZ d dlZd dlmZ d dlmZ d dl m Z mZ dd lm Z dd lmZ d dlmZ G d� d eee� � � � ZdS )� )�absolute_import)�print_function)�divisionN)�ABCMeta)� iteritems)�ENABLED_STATUS�NOT_INSTALLED_STATUS� )�BaseSelectorConfig)�BasePkgManager)�with_metaclassc � � e Zd ZdZd� Zed� � � Zej d� � � Zed� � � Zd� Z d� Z d� Zd � Zd � Z dd�Zd S )�BaseSelectorManagerz:Responsible for actual interpreter selector high-level APIc �Z � || _ || _ t j � � dk | _ dS )zc :type cfg: config.BaseSelectorConfig :type pkg: pkgmanager.BasePkgManager r N)�pkg�cfg�os�geteuid�is_root_user)�selfr r s �]/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/baseclselect/selector_manager.py�__init__zBaseSelectorManager.__init__ s+ � � �������J�L�L�A�-����� c � � | j j S �N)r �selector_enabled�r s r r z$BaseSelectorManager.selector_enabled$ s � ��x�(�(r c �P � || j _ | j � � � d S r )r r �save)r �vals r r z$BaseSelectorManager.selector_enabled( s � �$'���!��� � �����r c �4 � | j � � � S r )r �get_default_versionr s r �default_versionz#BaseSelectorManager.default_version- s � ��x�+�+�-�-�-r c �l � | j � |� � | j � � � d S r )r �set_default_versionr �r �versions r �switch_default_versionz*BaseSelectorManager.switch_default_version1 s+ � ���$�$�W�-�-�-��� � �����r c �n � | j � ||� � | j � � � dS )z6Disable/Enable particular interpreter version globallyN)r �set_version_statusr )r r'