ok

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/clquota.cpython-37.pyc

B

E!wd|�@sxddlmZddlmZddlmZddlZddlZddlmZddlm	Z	m
Z
mZe�d�Z
deeed	�d
d�ZdS)
�)�absolute_import)�division)�print_functionN)�Optional)�get_mount_point�run_command�ExternalProgramFailedzuser quota on .+ \(.+\) is on�/home)�path�returnc
Cs�tj�d�sdSyt|�}Wn,ttfk
rH}z
d|��Sd}~XYnXydd|g}t|�}Wn*tk
r�}zt|�}Wdd}~XYnX|��}t	�
|�s�|SdS)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�OSErrorrr�str�strip�USER_QUOTA_ON_PATTERN�search)r
Zmount_point�eZquotaon_cmdZquotaon_output�r�A/opt/alt/python37/lib/python3.7/site-packages/clcommon/clquota.py�check_quota_enableds

r)r	)Z
__future__rrr�rer�typingrZclcommon.utilsrrr�compilerrrrrrr�<module>	s


Zerion Mini Shell 1.0