ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/clcommon/cpapi/plugins/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyc

�
b=0Yc@s�ddlZyddlZWnek
r5dZnXddlmZmZddlmZdZ	dZ
d�Ze	d�Zddd	�Z
ded
�Zddd�ZdS(i����N(tNotSupportedt	NoPackage(tClPwds/etc/psa/.psa.shadowtPleskcCstjjd�S(Ns/usr/local/psa/version(tostpathtisfile(((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pytdetectscCsCt�}d|d<t|�}|j�j�|d<|j�|S(Ntadmintlogintpass(tdicttopentreadtstriptclose(t
_pass_pathtaccesstf((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt	db_accesss	

tpsac
Cs�tstd��n|p!t�}|jdd�}|d}|d}tjd|d|d|d|�}|j�}d	}|j|�g|j�D]}	|	d
^q�}
|j�|
S(Ns@Can not connect to database; MySQL-python package not installed.thostt	localhostR	R
tusertpasswdtdbsSELECT login FROM sys_usersi(	tMySQLdbRRtgettconnecttcursortexecutetfetchallR(t_accsesst_dbnameRtdbhosttdblogintdbpassRRtsqltfetched_onetcpusers_lst((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pytcpusers!s

$
#
cCstd��dS(Ns|Getting binding credentials in the database to the user name in the system is not currently supported. Is under development.(R(tcplogin_lsttwith_system_users((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pytdblogin_cplogin_pairs1sc
CsWg}|dkr<y
t�}WqBtk
r8d}qBXn|}g}|dk	ryg|D]}|jd�^q[}ntd�}|j�}t|ttf�r�dt	fd��Y}i}x*|D]\}	}
||	|
�||	<q�Wnxa|D]Y}t
|�r||krq�ntjj
||j�}||kr�|j|�q�q�W|S(s
    Detects and returns list of folders contained the home dirs of users of the DirectAdmin

    :param str|None _sysusers: for testing
    :param str|None _path: for testing
    :return: list of folders, which are parent of home dirs of users of the panel
    tutf8i'tpwcBseZd�ZRS(cSs||_||_dS(N(tpw_nametpw_dir(tselftnametdir((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt__init__Ss	(t__name__t
__module__R3(((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyR-RsN(tNoneR(RtencodeRt
get_user_dictt
isinstancetlistttupletobjecttlenRRtdirnameR/tappend(
t	_sysuserst_cpusersthomedirstresultstuserstlinetclpwdt
users_dictR-R1R2t	user_namethomedir((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyRB5s0	


%
(RRtImportErrorR6tclcommon.cpapi.cpapiexceptionsRRtclcommonRtPSA_SHADOW_PATHt
__cpname__RRR(tFalseR+RB(((s@/usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt<module>s

		

Zerion Mini Shell 1.0