File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/bluez_bluetooth.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlZddlZddlmZ dZzddlZdZW n ey# Y nw ddiZ dZ d d � Zdd� Zd d� Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� ZdS )"z� Support for Bluetooth (using BlueZ in Linux). The following packages are required packages for this module: bluez >= 5.7 bluez-libs >= 5.7 bluez-utils >= 5.7 pybluez >= 0.18 � N)�CommandExecutionErrorFT�address_�address� bluetoothc C s t rtS dS )z8 Only load the module if bluetooth is installed )FzIThe bluetooth execution module cannot be loaded: bluetooth not installed.)�HAS_PYBLUEZ�__virtualname__� r r �P/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/bluez_bluetooth.py�__virtual__ s r c C sZ d} t d | ��� }|d }d}ztj}W n ty' } zW Y d}~nd}~ww ||d�S )z� Return Bluez version from bluetoothd -v CLI Example: .. code-block:: bash salt '*' bluetoothd.version zbluetoothctl -v�cmd.runr z <= 0.18 (Unknown, but installed)N)ZBluezZPyBluez)�__salt__� splitlinesr �__version__� Exception)�cmd�outZ bluez_versionZpybluez_version�excr r r �version+ s �� r c C s� i } d}t d |��� }d}|D ]>}|�d�r*|�d�}|d }|d|� �d�| |<