관리-도구
편집 파일: utils.cpython-37.pyc
B �v6d�= � @ s d dl mZ d dl mZ d dl mZ d dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlmZ d dl mZmZmZmZ d dlmZ d dlmZ d d lmZ d d lmZmZmZ d dlmZ d dlmZ d d l m!Z! ddl"m#Z# ddl$m%Z% dZ&dZ'dSdd�Z(dTdd�Z)dd� Z*dd� Z+dd� Z,dd� Z-dd � Z.d!d"� Z/d#d$� Z0d%d&� Z1dUd(d)�Z2dVd*d+�Z3dWd-d.�Z4dXd/d0�Z5d1d2� Z6d3d4� Z7d5d6� Z8d7d8� Z9d9d:� Z:d;d<� Z;d=d>� Z<dYdAdB�Z=dCdD� Z>dEdF� Z?dGdH� Z@dZdIdJ�ZAeBeCdK�dLdM�ZDeBdN�dOdP�ZEdQdR� ZFdS )[� )�print_function)�absolute_import)�divisionN)�time)�AnyStr�List�Dict�Optional)�Path)�resolve_username_and_doc_root)�CP_NAME)�NoDomain�NotSupported� IncorrectData)�mod_makedirs)�init_sentry_client)�get_pkg_version� )�clprint)�ClSelectExceptz/sbin/cagefs_enter_userzbhttps://1ba721bc7abc4a8f89b1ffc185088bf7:3bac2b8189a043f7856d24046255f116@sentry.cloudlinux.com/19c C s� y0t j| td�t jt jd|dd�}|�� \}}W n: ttfk rj } zt� | d t |���W dd}~X Y nX |jdkr�t�|p�dd� | �|f ��|S )z� Runs external process and returns output :param cmd: command and arguments as a list :param env_data :return string z /dev/nullT)�stdin�stdout�stderr� close_fds�env�textr Nzoutput of the command: %s %s� )� subprocess�Popen�open�PIPE�STDOUT�communicate�OSError�IOErrorr �FileProcessError�str� returncode�ExternalProgramFailed�join)�cmd�env_data�output�std_out�std_err�e� r0 �?/opt/alt/python37/lib/python3.7/site-packages/clselect/utils.py�run_command&