| Server IP : 46.245.81.90 / Your IP : 216.73.216.85 Web Server : Apache System : Linux server3ir.xdlhost.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64 User : gmparts ( 1037) PHP Version : 8.1.34 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/setoptconf/__pycache__/ |
Upload File : |
a
`8ab � @ sH d dl mZ ddlmZ ddlmZ ddlmZ dZG dd� de �Z
d S )
� )�deepcopy� )�
Configuration)�Setting)�Source)�ConfigurationManagerc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )r c C s || _ g | _d S )N)�name�settings)�selfr � r �H/home/carl/code/landscape/setoptconf-tmp/build/lib/setoptconf/manager.py�__init__ s zConfigurationManager.__init__c C s$ t |t�r| j�|� ntd��d S )Nz$Can only add objects of type Setting)�
isinstancer r �append� TypeError)r
�settingr r r �add s
zConfigurationManager.addc G s� g }t |�D ]D}t|t�r&|�|� qt|t�rHt|t�rH|�|� � qtd��qt| jd�}|D ]}|j t
| j�| |d�}qb|�� |S )NzAll sources must be a Source)r )�manager�parent)�reversedr r r �type�
issubclassr r r Z
get_configr �validate)r
�sourcesZ
to_process�source�configr r r �retrieve s
�zConfigurationManager.retrieveN)�__name__�
__module__�__qualname__r
r r r r r r r s r N)�copyr r r r r Zsource.baser �__all__�objectr r r r r �<module> s