????
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/cllimits/lib/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/cllimits/lib/__pycache__/utils.cpython-311.pyc |
� xޘfE � � � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlZd dlZd dlm Z m Z dZd� Zd� Z d � Zdd�Zdd �Zdd�Zd� Zd� ZdS )� )�print_function)�absolute_import)�divisionN)�run_command�ExternalProgramFailedzAvailable values for optionc � � | � d� � r#| � dd� � \ }}d|z d|id�S | � t � � r5| � dd� � \ }}d|z d |� � � id�S d | iS )zu Replacing params in data for show error message :param data: error's data for show message :return: z--� � z %%(param)s %s�param)�result�context�:z%s: %%(available_options)s�available_optionsr )� startswith�split� VALUES_STR�strip)�datar �texts �I/opt/cloudlinux/venv/lib64/python3.11/site-packages/cllimits/lib/utils.py�replace_paramsr s� � � ���t��� ��j�j��a�(�(���t�)�D�0�g�u�=M�N�N�N� ���� $� $� ��j�j��a�(�(���e�6��=�/������?�A� A� A� �$��� c �H � t | � � dS # t $ r Y dS w xY w)z� Checks is string contains a number (integer or float) :param s_val: String to check :return: True - string is number, False - not number TF)�float� ValueError)�s_vals r �_is_string_numberr &