File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/mysql_database.cpython-310.pyc
Back
o ;j� � @ sD d Z ddlZddlZe�e�Zdd� Zdd� Zddd�Zd d � Z dS )ay Management of MySQL databases (schemas) ======================================= :depends: - MySQLdb Python module :configuration: See :py:mod:`salt.modules.mysql` for setup instructions. The mysql_database module is used to create and manage MySQL databases. Databases can be set as either absent or present. .. code-block:: yaml frank: mysql_database.present � Nc C s dt v rdS dS )z@ Only load if the mysql module is available in __salt__ �mysql.db_existsT)Fz mysql module could not be loaded)�__salt__� r r �N/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/mysql_database.py�__virtual__ s r c C s t jtd j j�dd�S )zp Look in module context for a MySQL error. Eventually we should make a less ugly way of doing this. z test.pingzmysql.errorN)�sys�modulesr � __module__�__context__�popr r r r �_get_mysql_error"