File: //opt/alt/python37/lib/python3.7/site-packages/__pycache__/cli_utils.cpython-37.opt-1.pyc
B
R`�
1���� @ sN d Z ddlmZ ddlmZ ddlZdZeed�dd�Zd
e e d
�dd�Z
dS )z�
This module serves as a collection of functions needed by various
cloudlinux-* utilities. It should not include any functions specific to a one
single utility as to not pollute it with unnecessary imports.
� )�print_function)�absolute_importNzAvailable values for option)�data�returnc C sd | � d�r,| �dd�\}}d| d|id�S | � t�r\| �dd�\}}d| d |�� id�S d
| iS )z�
Replacing params in a data string to display an error message for humans.
:param data: error's data for show message
:return: a dictionary suitable for UI
z--� � z
%%(param)s %s�param)�result�context�:z%s: %%(available_options)sZavailable_optionsr )�
startswith�split�
VALUES_STR�strip)r r �text� r �cli_utils.py�replace_params s
r F)�is_json� is_prettyc C s>