Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
ssa
/
configuration
/
__pycache__
/
File Content:
__init__.cpython-37.pyc
B ��d� � @ s� d dl Z d dlmZ d dlmZ ddlmZ ddlmZ ddl m Z ed �d d�Zed �dd �Ze d �dd�Zeee d�dd�ZdS )� N)�urlopen)�Schema� )�SSAConfigParser)�validate� )�SSAError)�returnc C s t � } | �� | S )zB Create parser and load configuration :return: parser )r Z read_ssa_conf)�conf� r �K/opt/alt/python37/lib/python3.7/site-packages/ssa/configuration/__init__.py�load_parser s r c C s t � } tt| �� ��}| S )zL Create parser, load configuration, validate it :return: parser )r r �dict�items)r �_r r r �load_validated_parser s r c C s t � } tt| �� ��S )z) Load and validate configuration )r r r r )r r r r �load_configuration s r )�external_source�schemer c C sX d| � �}y$t |��}tt�|�|�S Q R X W n$ ttjtfk rR tt� |�S X dS )zW Load values from remote JSON config or default values in case of troubles z2https://repo.cloudlinux.com/cloudlinux/sources/da/N)r r �json�load�OSError�JSONDecodeErrorr r )r r Zcfg_locationZcfgr r r � load_tunables'