O W*0 dZddlZddlZddlZddlmZddlmZddlm Z dZ da da ej ZGdded gd Zd Zd Zd ZdS)z8 Wrapper over integration config which provides typing. N) ConfigParser) namedtuple)NotImplementedByVendorz!/opt/cpvendor/etc/integration.inic"eZdZdZfdZxZS) ScriptsCMDzg Wrapper over namedtuple that raises exception when we access property that has None value clt|}|t||S)za Raise error if command is not implemented, but we try to get it in code )super__getattribute__r)selfitemobj __class__s /builddir/build/BUILDROOT/alt-python27-cllib-3.4.40-1.el9.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/vendors_api/config.pyr zScriptsCMD.__getattribute__*s4 gg&&t,, ;(.. . )__name__ __module__ __qualname____doc__r __classcell__)rs@rrrsB rrVendorScriptsPath panel_infodb_infopackagesusersdomains resellersadminsphpcL|dSttj|S)zm Taking command line as input, convert it into subprocess args If cmd is None -> return None N)tupleshlexsplit)cmds r_split_path_or_noner%5s&  {t S!! " ""rct5tjt}t t |kr/t}|d}tt| dt| dt| dt| dt| dt| dt| dt| d  a|at cdddS#1swxYwYdS) Nintegration_scriptsrrrrrrrrr) _integration_scripts_lockospathgetmtime CONFIG_PATHintegration_scripts_cacheconfig_last_modify_time_read_config_filerr%get) modify_timeconfigscriptss rr'r'@s #))g&&{33 $ ,';66&((F23G(2.w{{*>??+GKK ,B,BCC-gkk+.F.FGG*7;;x+@+@AA' E(:(:;; ) ) ) %'2 #('))))))))))))))))))sE-FF FctddtfdDS)z< Parse config file and return result as dictionary. NF) interpolationstrictcVi|]%}|t|&S)dictitems).0sparsers r z%_read_config_file..as- @ @ @AtFLLOO$$ @ @ @r)rreadr,sections)r=s@rr/r/ZsMU ; ; ;F KK  @ @ @ @foo.?.? @ @ @@r)rr)r" threading configparserr collectionsrvendors_api.exceptionsrr,r-r.Lockr(rr%r'r/r8rrrFs   %%%%%%""""""9999991  *IN,,/ 2 2 2  4###)))4AAAAAr