File: //usr/share/l.v.e-manager/__pycache__/exec_command.cpython-311.pyc
�
3@i � �P � d dl mZ d dl mZ d dl mZ d dlZd dlZd� Zdd�Zdd�ZdS ) � )�print_function)�division)�absolute_importNc � � t | t � � r.| � � � dk rg S t j | � � S t | t
� � r| S g S )z;
Parses a command string into a list of arguments.
� )�
isinstance�str�strip�shlex�split�list)�commands �l/builddir/build/BUILDROOT/lvemanager-7.11.31-1.el8.cloudlinux.x86_64/usr/share/l.v.e-manager/exec_command.py�
parse_commandr sZ � � �'�3��� ��=�=�?�?�b� � ��I��{�7�#�#�#� �G�T� "� "� ���� � c � � g } t | � � }|st d| � �� � �t j |t j |d�� � } |j � � � }|sn@|� � � dk r'|� |� � � � � �\n4# t $ r'}t dt |� � � � Y d}~nd}~ww xY w|S )z
Execute command
�#The provided command is not valid: T��stdout�env�text� r zCall process error:N)r �
ValueError�
subprocess�Popen�PIPEr �readliner
�append� Exception�printr )r r �result�args�p�output�insts r �exec_commandr&