Edit File: clquota.cpython-37.opt-1.pyc
B �e| � @ sx d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZ d dlm Z m Z mZ e�d�Z deee d �d d�ZdS ) � )�absolute_import)�division)�print_functionN)�Optional)�get_mount_point�run_command�ExternalProgramFailedzuser quota on .+ \(.+\) is on�/home)�path�returnc C s� t j�d�sdS yt| �}W n, ttfk rH } z d|� �S d}~X Y nX ydd|g}t|�}W n* tk r� } zt|�}W dd}~X Y nX |�� }t � |�s�|S dS )z� Check if quotas enabled and initialised for specific path :return: string message with giagnostick information if disabled; None if enabled z /sbin/quotaonzPackage "quota" not installedz$Error during mount point detection: Nz-up)�osr �isfiler �OSErrorr r �str�strip�USER_QUOTA_ON_PATTERN�search)r Zmount_point�eZquotaon_cmdZquotaon_output� r ��/builddir/build/BUILDROOT/alt-python27-cllib-3.3.5-1.el8.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/clcommon/clquota.py�check_quota_enabled s r )r )Z __future__r r r �rer �typingr Zclcommon.utilsr r r �compiler r r r r r r �<module> s