ok
Direktori : /usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/ |
Current File : //usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyc |
� b=0Yc @ s� d d l Z y d d l Z Wn e k r5 d Z n Xd d l m Z m Z d d l m Z d Z d Z d � Z e d � Z d d d � Z d e d � Z d d d � Z d S( i����N( t NotSupportedt NoPackage( t ClPwds /etc/psa/.psa.shadowt Pleskc C s t j j d � S( Ns /usr/local/psa/version( t ost patht isfile( ( ( s@ /usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt detect s c C sC t � } d | d <t | � } | j � j � | d <| j � | S( Nt admint logint pass( t dictt opent readt stript close( t _pass_patht accesst f( ( s@ /usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt db_access s t psac C s� t s t d � � n | p! t � } | j d d � } | d } | d } t j d | d | d | d | � } | j � } d } | j | � g | j � D] } | d ^ q� } | j � | S( Ns@ Can not connect to database; MySQL-python package not installed.t hostt localhostR R t usert passwdt dbs SELECT login FROM sys_usersi ( t MySQLdbR R t gett connectt cursort executet fetchallR ( t _accsesst _dbnameR t dbhostt dblogint dbpassR R t sqlt fetched_onet cpusers_lst( ( s@ /usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt cpusers! s $ # c C s t d � � d S( Ns| Getting binding credentials in the database to the user name in the system is not currently supported. Is under development.( R ( t cplogin_lstt with_system_users( ( s@ /usr/lib/python2.7/site-packages/clcommon/cpapi/plugins/plesk.pyt dblogin_cplogin_pairs1 s c C sW g } | d k r<