
    l
jN                     j    d Z ddlmZ dZ G d de      Z G d dee      Zddlm	Z	m
Z
 dd	lmZ g d
Zy)z7Python interface to the Landlock Linux Security Module.    )Optionalz
1.0.0.dev5c                       e Zd ZdZy)LandlockErrorz"Generic exception for this module.N)__name__
__module____qualname____doc__     ,/usr/libexec/warpinator/landlock/__init__.pyr   r      s    ,r   r   c                   D     e Zd ZdZdddee   f fdZ fdZd Z xZ	S )SyscallErrorz Exception raised from a syscall.N)reasonr   c                ,    || _         t        |   |  y)ztAugments an OSError with a "reason".

        This is similar to BaseException.add_note() from Python 3.11.
        N)r   super__init__)selfr   args	__class__s      r   r   zSyscallError.__init__   s    
 $r   c                 `    t         |          }| j                  |d| j                   z   S |S )Nz
Note: )r   __str__r   )r   	super_strr   s     r   r   zSyscallError.__str__   s5    GO%	;;"$++777r   c                     | j                   j                   ddj                  | j                         d| j                   dS )N(z, z	, reason=))r   r   joinr   r   )r   s    r   __repr__zSyscallError.__repr__   s;    ~~&&'q499)=(>i}TUV	
r   )
r   r   r   r	   r   strr   r   r   __classcell__)r   s   @r   r   r      s#    *6:  hsm  
r   r   )FSAccesslandlock_abi_version)Ruleset)r    r!   r   r"   r   N)r	   typingr   __version__	Exceptionr   OSErrorr   landlock.plumbingr    r!   landlock.porcelainr"   __all__r
   r   r   <module>r*      s9    = -I -
7M 
. = &r   