관리-도구
편집 파일: calls.cpython-38.pyc
U *�e� � @ s� d dl Z d dlZd dlZe �e�ZejjZ G dd� de �Zdd� Zdd� Z dd � Ze jZg e_ee_e jZejejejge_ee_e jZejejge_ee_ee d d�dk r�e jZn ee dd�dk r�e jZned��dS ) � Nc s e Zd Z� fdd�Z� ZS )�InotifyErrorc s6 t �� | _|d| jf 7 }tt| �j|f|�|� d S )Nz ERRNO=(%d))�ctypesZ get_errno�errno�superr �__init__)�self�message�args�kwargs�� __class__� �;/opt/hc_python/lib/python3.8/site-packages/inotify/calls.pyr s zInotifyError.__init__)�__name__� __module__�__qualname__r � __classcell__r r r r r s r c C s | dkrt d| f ��| S )Nr z&Call failed (should return zero): (%d)�r ��resultr r r �_check_zero s �r c C s | dkrt d| f ��| S )Nr z)Call failed (should return nonzero): (%d)r r r r r �_check_nonzero s �r c C s | dkrt d| f ��| S )N���z$Call failed (should not be -1): (%d)r r r r r �_check_nonnegative s �r r �errz'errno' not found in library)�loggingr Zinotify.libraryZinotify� getLoggerr Z_LOGGER�library�instanceZ_LIB� Exceptionr r r r Zinotify_initZargtypes�restypeZinotify_add_watch�c_int�c_char_pZc_uint32Zinotify_rm_watch�getattrr r �EnvironmentErrorr r r r �<module> s2 �