3
�Xj � @ s4 d dl Z d dlmZmZ dd� Zdd� Zdd� ZdS ) � N)�PIPE�Popenc C sf t jjd�std��d} t| dttd�}dd� |j� D �\}}|rPtd|� ���t|d d� jd
��S )z�
Get user count using the common CloudLinux library.
This number is more accurate for systems
with a control panel installed.
z/opt/cloudlinux/venv/binz(CloudLinux virtual environment not foundzZ/opt/cloudlinux/venv/bin/python3 -c "from clcommon.cpapi import cpusers; print(cpusers())"T)�shell�stdout�stderrc S s g | ]}|j � j� �qS � )�decode�strip)�.0�resultr r � /usr/lib/python3.6/statistics.py�