HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/vendors_api/__pycache__/config.cpython-37.pyc
B

�+3fu�I��
@s�dZddlmZddlmZddlmZddlZddlZddlmZddl	m
Z
ddlmZd	Z
dadaGd
d�de
dd
dddddddg��Zdd�Zdd�Zdd�ZdS)z8
Wrapper over integration config which provides
typing.
�)�absolute_import)�division)�print_functionN)�ConfigParser)�
namedtuple)�NotImplementedByVendorz!/opt/cpvendor/etc/integration.inics eZdZdZ�fdd�Z�ZS)�
ScriptsCMDzg
    Wrapper over namedtuple that raises exception
    when we access property that has None value
    cs$tt|��|�}|dkr t|��|S)za
        Raise error if command is not implemented,
        but we try to get it in code
        N)�superr�__getattribute__r)�self�item�obj)�	__class__���/builddir/build/BUILDROOT/alt-python27-cllib-3.4.1-1.el9.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/vendors_api/config.pyr
*szScriptsCMD.__getattribute__)�__name__�
__module__�__qualname__�__doc__r
�
__classcell__rr)rrrs
rZVendorScriptsPath�
panel_info�db_info�packages�users�domains�	resellers�admins�phpcCs|dkrdStt�|��S)zm
    Taking command line as input, convert it into
    subprocess args
    If cmd is None -> return None
    N)�tuple�shlex�split)�cmdrrr�_split_path_or_none5sr"cCs�tj�t�}tdkst|kr�t�}|d}tt|�	d��t|�	d��t|�	d��t|�	d��t|�	d��t|�	d��t|�	d��t|�	d	��d
�a|atS)N�integration_scriptsrrrrrrrr)rrrrrrrr)
�os�path�getmtime�CONFIG_PATH�integration_scripts_cache�config_last_modify_time�_read_config_filerr"�get)Zmodify_timeZconfigZscriptsrrrr#@s r#cs,tddd����t��fdd����D�S)z<
    Parse config file and return result as dictionary.
    NF)Z
interpolation�strictcsi|]}t��|��|�qSr)�dict�items)�.0�s)�parserrr�
<dictcomp>`sz%_read_config_file.<locals>.<dictcomp>)r�readr'Zsectionsrr)r1rr*Ys
r*)rZ
__future__rrrr$rZconfigparserr�collectionsrZvendors_api.exceptionsrr'r(r)rr"r#r*rrrr�<module>s.