/usr/lib/python2.6/site-packages/clcommon/cpapi
NameSizeModeActions
cache/-0755rm
plugins/-0755rm
apilink.py340644editdlrm
apilink.pyc2080644editdlrm
apilink.pyo2080644editdlrm
clcpapi.py30120644editdlrm
clcpapi.pyc32480644editdlrm
clcpapi.pyo32480644editdlrm
const.py3330644editdlrm
const.pyc5500644editdlrm
const.pyo5500644editdlrm
cpapiexceptions.py11180644editdlrm
cpapiexceptions.pyc29440644editdlrm
cpapiexceptions.pyo29440644editdlrm
cpapirebuildcache2690644editdlrm
pluginlib.py38620644editdlrm
pluginlib.pyc36050644editdlrm
pluginlib.pyo36050644editdlrm
__init__.py39800644editdlrm
__init__.pyc52510644editdlrm
__init__.pyo52510644editdlrm
Edit: /usr/lib/python2.6/site-packages/clcommon/cpapi/pluginlib.pyc (3605B)
Ñò \=0Yc @sdZddkZddklZddkZddkZddklZlZlZddk l Z dZ eƒZ e i e ƒdZdZdZe id d d d ƒoe id d d d ƒZneiieiieƒd ƒZd„Zed„ZdS(s Library to work with plug-ins iÿÿÿÿN(t ConfigParser(t CACHE_CPNAMEtUNKNOWN_CP_NAMEtUNKNOWN_CP_IMPORT(tPluginImportErrors/etc/sysconfig/cloudlinuxt __cpname__tdetecttsectiontcpapitoptiont plugindirs apilink.pyc Bs)eiieiieƒ|ƒ}g}eieii|dƒƒD])}|eiieii|ƒƒdqD~}x¬|D]¤}|djoq}nd}d||f}y |dUWne d|fƒ‚nXe |e dƒ}|o2e |e dƒ} | o| ƒo ||fSq}q}WdS(s³ Scan directory for the presence of plugins. Plugin is considered a file with the extension "py", and with a non-empty variable "__cpname__" inside (the name of the control panel). Also in the file must be a function "detect" which returns True in the case of the presence of the control panel. >>> detectplugin('plugins') ('from .plugins import cpanel as api', 'cPanel') :param plugin_pack: package name or the name of the plug-ins directory ('cache' - cache plugins users; 'plugins' - officially supported plug-ins) :rtype: tuple :return: a pair of values​​: (line to import the package, the name of the control panel) s*.pyit__init__sfrom %s import %s as apiNsCan not import %s plugin(NN( tostpathtjointdirnamet__file__tglobtsplitexttbasenametNoneRtgetattrtCONTROLPANELNAME_VARtDETECTFUNCNAME_VAR( t plugin_packt plugin_dirt_[1]t py_full_pathtmodulestmod_nametapit import_stringtcontrolpanelnamet detect_func((s</usr/lib/python2.6/site-packages/clcommon/cpapi/pluginlib.pyt detectplugin s$!U  c CsÌd}d}tiitiitƒ|ƒ}ti|ƒ|o'tii|ƒoti||ƒnti |ƒti |dƒtii|dƒ}t |dƒi ƒyt |ƒ\}}Wn0tj o$}d \}}dt|ƒGHnX|djoCti|ƒti |ƒt |dƒi ƒt |ƒ\}}n|djott}}d|GHn|oTt tdƒ}|i|ƒ|i ƒt tdƒ} | i|dƒ| i ƒndS( Ntcachetpluginsiís __init__.pytwsWARNING:sHWARNING: can not detect control panel; the control panel is set to "%s" s (NN(R R RRRtshutiltrmtreetisdirtcopytreetmkdirtchmodtopentcloseR"RRtstrRRRtwritet API_LINK_PATH( t pludins_dirt CACHE_DIRt PLUGINS_PATHt cache_dirt init_pathRtcpnametet cpname_cachetapi_link_stream((s</usr/lib/python2.6/site-packages/clcommon/cpapi/pluginlib.pyt rebuild_cacheCs<!           (t__doc__R RRR&tconstRRRtcpapiexceptionsRt CLSYSCONFIGt clsysconfigtreadRRRt PLUGINS_DIRt has_optiontgetR RRRR0R"R:(((s</usr/lib/python2.6/site-packages/clcommon/cpapi/pluginlib.pyts"     ! #