
    &b                     4    d Z ddlmZ  G d dee          ZdS )z4 Lockfile behaviour implemented via Unix PID files.     )PIDLockFilec                   0     e Zd ZdZd fd	Zd fd	Z xZS )TimeoutPIDLockFilea?   Lockfile with default timeout, implemented as a Unix PID file.

        This uses the ``PIDLockFile`` implementation, with the
        following changes:

        * The `acquire_timeout` parameter to the initialiser will be
          used as the default `timeout` parameter for the `acquire`
          method.
        Nc                 P    || _          t                      j        |g|R i | dS )z Set up the parameters of a TimeoutPIDLockFile.

            :param path: Filesystem path to the PID file.
            :param acquire_timeout: Value to use by default for the
                `acquire` call.
            :return: ``None``.
            N)acquire_timeoutsuper__init__)selfpathr   argskwargs	__class__s        0/usr/lib/python3/dist-packages/daemon/pidfile.pyr	   zTimeoutPIDLockFile.__init__   s:      //////////    c                 T    || j         } t                      j        |g|R i | dS )aw   Acquire the lock.

            :param timeout: Specifies the timeout; see below for valid
                values.
            :return: ``None``.

            The `timeout` defaults to the value set during
            initialisation with the `acquire_timeout` parameter. It is
            passed to `PIDLockFile.acquire`; see that method for
            details.
            N)r   r   acquire)r
   timeoutr   r   r   s       r   r   zTimeoutPIDLockFile.acquire#   s>     ?*G1$111&11111r   )N)__name__
__module____qualname____doc__r	   r   __classcell__)r   s   @r   r   r      se         	0 	0 	0 	0 	0 	02 2 2 2 2 2 2 2 2 2r   r   N)r   lockfile.pidlockfiler   objectr    r   r   <module>r      sU    ; : , , , , , ,$2 $2 $2 $2 $2f $2 $2 $2 $2 $2r   