+
    jHàj¾  ã                  óÀ   a € 0 t $ R t^ RIHt ^ RIt^ RIHt ^ RIHt ]P                  ! R4      t
 ! R R]4      t]! 4       tR]R	&   R
 R ltR R ltR R ltR R ltR# )z™The unusable scoped-lock dir report (#134889 W2). :mod:`gateway.status` raises it from
``acquire_scoped_lock``; nothing here reads back into that module.)ÚannotationsN)ÚPath)Úunusable_dir_remedyzgateway.statusc                  ó   € ] tR t^tRtRtR# )ÚScopedLockDirUnusablea  This token cannot create, read or replace locks in the scoped-lock dir (#134889 W2).

On Windows an elevated install/update creates ``gateway-locks`` owned by Administrators with
no entry for the user; the same user's non-elevated gateway then gets ``Permission denied`` on
every token lock. The adapter reports it once and names the repair; it stays retryable (the
dir is shared by every token-locked adapter), so a repair is picked up without a restart. A
``PermissionError`` subclass so existing callers keep their handling.
© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    Ú</home/ubuntu/.hermes/hermes-agent/gateway/status_lock_dir.pyr   r      s   † õr   r   z	set[Path]Ú_warnedc               ó$   € V ^8„  d   QhRRRRRR/# )é   Úlock_dirr   ÚexcÚPermissionErrorÚreturnr   r   )Úformats   "r   Ú__annotate__r      s'   € ÷ kñ k ð k¨?ð kÐ?Tñ kr   c           	     ó
  € V \         9   d   \        P                  M\        P                  p\         P	                  V 4       \
        P                  VRW\        V 4      4       \        VP                  RV 2\        V 4      4      # )zTLog *lock_dir* as unusable (WARNING once, then DEBUG) and return the error to raise.zÉGateway lock directory %s is not usable by this process (%s); it was likely created by an elevated (administrator) Hermes. Platforms that need a token lock stay down until it is repaired. To repair, %sz&gateway lock directory is not usable: )
r   ÚloggingÚDEBUGÚWARNINGÚaddÚlogr   r   ÚerrnoÚstr)r   r   Úlevels   && r   Úunusable_lock_dirr"      sj   € à%¬Ô0ŒG�MŠM´g·o±o€EÜ‡K�K�ÔÜ‡G�GˆEð ,à-5Ô<OÐPXÓ<Yô[ô ! §¡Ð.TÐUXÐTYÐ,ZÔ\_Ð`hÓ\iÓjÐjr   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   ÚNoner   )r   s   "r   r   r   '   s   € ÷ ñ ¨$ð °4ñ r   c                ó0   € \         P                  V 4       R# )zMA lock was taken in *lock_dir*: warn again if it ever becomes unusable later.N)r   Údiscard©r   s   &r   Úunusable_lock_dir_recoveredr(   '   s   € ä‡O�O�HÖr   c               ó   € V ^8„  d   QhRR/# )r   r   r$   r   )r   s   "r   r   r   ,   s   € ÷ ñ ¨ñ r   c                 ó.   € \         P                  4        R# )z4Forget every report (a fresh process's view; tests).N)r   Úclearr   r   r   Úreset_unusable_lock_dir_reportsr,   ,   s   € ä‡M�M†Or   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   Úboolr   )r   s   "r   r   r   1   s   € ÷ ñ ¨ð °$ñ r   c                ó   € V \         9   # )N)r   r'   s   &r   Úunusable_lock_dir_reportedr0   1   s   € Ø”wÑÐr   )Ú__conditional_annotations__r   Ú
__future__r   r   Úpathlibr   Úhermes_dir_aclr   Ú	getLoggerr   r   r   Úsetr   Ú__annotations__r"   r(   r,   r0   )r1   s   @r   Ú<module>r8      sX   øðôFå "ã Ý å .à×ÒÐ(Ó)€ô˜Oô ñ “U€ˆÓ õkõõ
÷
r   