+
    üÐj*  ã                   ó  € R t ^ RIt^ RIt^ RIHt ^ RIHt R t^ RIHt ]P                  ! 4       '       g   ^ RIH
t
HtHtHt RtMRt ^ RIt^ R	IHt ^t^WtR
 t
]tR tR tR t ! R R4      tR tRR.tR#   ] d    Rt
 L)i ; i)z&
Filesystem-based interprocess mutex.
N)Útime)Úplatformc                  óH   € \        \        \        4       R ,          4      4      # )iè  )ÚstrÚintÚ_uniquefloat© ó    Ú9/usr/lib/python3/dist-packages/twisted/python/lockfile.pyÚuniquer      s   € ÜŒs”<“> DÕ(Ó)Ó*Ð*r	   )Úrename)ÚkillÚreadlinkÚremoveÚsymlinkFT)ÚOpenProcessc                 ó   €  \        ^ ^ V 4       \        R4      h  \        P                   d_   pTP                  ^ ,          \
        8X  d    Rp?R# TP                  ^ ,          \        8X  d   \        \        P                  R4      hh Rp?ii ; i)é    z OpenProcess is required to fail.N)
r   ÚRuntimeErrorÚ
pywintypesÚerrorÚargsÚERROR_ACCESS_DENIEDÚERROR_INVALID_PARAMETERÚOSErrorÚerrnoÚESRCH)ÚpidÚsignalÚes   && r
   r   r   4   ss   € ð	GÜ˜A˜q #Ô&ô #Ð#EÓFÐFøô ×#Ñ#ô Ø—6‘6˜!•9Ô 3Ô3ÝØ—V‘V˜A•YÔ"9Ô9Ü!¤%§+¡+¨tÓ4Ð4Øûðús   ‚ šB¯BÁ7BÂBc                óä  € VR,           \        4       ,           R,           p\        P                  P                  VR4      p\        P                  ! V4       Rp\        W44      ;_uu_ 4       pVP                  V 4       VP                  4        RRR4        \        W!4       R#   + '       g   i     L; i  \         d/    \        P                  ! T4       \        P                  ! T4       h i ; i)zr
Write a file at C{filename} with the contents of C{value}. See the
above comment block as to why this is needed.
Ú.z.newlinkr   ÚwN)r   ÚosÚpathÚjoinÚmkdirÚ_openÚwriteÚflushr   ÚBaseExceptionr   Úrmdir)ÚvalueÚfilenameÚnewlinknameÚ
newvalnameÚmodeÚfs   &&    r
   r   r   E   s§   € ð  •n¤v£xÕ/°*Õ<ˆÜ—W‘W—\‘\ +¨yÓ9ˆ
Ü
�Š�Ôð ˆä�:×$Ô$¨Ø�G‰G�EŒNØ�G‰GŒI÷ %ð	Ü�;Ö)÷ %×$ûô ô 	Ü�IŠI�jÔ!Ü�HŠH�[Ô!Øð	ús   Á+"B#ÂB6 Â#B3	Â69C/c                óš  €  \        \        P                  P                  V R4      R4      pV;_uu_ 4        VP	                  4       pRRR4       V#   + '       g   i     X# ; i  \
         d[   pTP                  \        P                  8X  g    TP                  \        P                  8X  d   \        TP                  R4      hh Rp?ii ; i)zY
Read the contents of C{filename}. See the above comment block as to why
this is needed.
r   ÚrN)	r'   r#   r$   r%   Úreadr   r   ÚENOENTÚEIO)r-   ÚfObjÚresultr   s   &   r
   r   r   `   s�   € ð
		ÜœŸ™Ÿ™ h°	Ó:¸CÓ@ˆD÷ ’ØŸ™›�÷ àˆM÷ –àˆMûô ô 	Ø�w‰wœ%Ÿ,™,Ô&¨!¯'©'´U·Y±YÔ*>Ü˜aŸg™g tÓ,Ð,Øûð	ús#   ‚*A% ¶AÁA"	Á%C
Á0ACÃC
c                 óš   € \         P                  ! \         P                  P                  V R 4      4       \         P                  ! V 4       R# )r   N)r#   r   r$   r%   r+   )r-   s   &r
   Úrmlinkr:   r   s)   € Ü
�	Š	”"—'‘'—,‘,˜x¨Ó3Ô4Ü
�Š�Ör	   c                   ó>   a € ] tR t^wt o RtRtRtR tR tR t	Rt
V tR# )ÚFilesystemLockaë  
A mutex.

This relies on the filesystem property that creating
a symlink is an atomic operation and that it will
fail if the symlink already exists.  Deleting the
symlink will release the lock.

@ivar name: The name of the file associated with this lock.

@ivar clean: Indicates whether this lock was released cleanly by its
    last owner.  Only meaningful after C{lock} has been called and
    returns True.

@ivar locked: Indicates whether the lock is currently held by this
    object.
NFc                ó   € Wn         R # )N)Úname)Úselfr>   s   &&r
   Ú__init__ÚFilesystemLock.__init__�   s   € ØŽ	r	   c                ó  € Rp  \        \        \        P                  ! 4       4      V P                  4       RT n        Yn        R#   \
         Ed¯   p\        '       d6   TP                  \        P                  \        P                  39   d    Rp?R# TP                  \        P                  8X  EdH    \        T P                  4      pMr  \
         de   pTP                  \        P                  8X  d    Rp? Rp?Kû  \        '       d*   TP                  \        P                  8X  d    Rp? Rp?R# h Rp?ii ; i \        e   \        \        T4      ^ 4       M™  \
         dŒ   pTP                  \        P                  8X  dg    \!        T P                  4       MB  \
         d5   pTP                  \        P                  8X  d    Rp? Rp? Rp?EKÒ  h Rp?ii ; iRp Rp? Rp?EKè  h Rp?ii ; i Rp?R# h Rp?ii ; i)z·
Acquire this lock.

@rtype: C{bool}
@return: True if the lock is acquired, false otherwise.

@raise OSError: Any exception L{os.symlink()} may raise,
    other than L{errno.EEXIST}.
TNF)r   r   r#   Úgetpidr>   r   Ú_windowsr   ÚEACCESr6   ÚEEXISTr   r5   r   r   r   r:   ÚlockedÚclean)r?   rH   r   r   s   &   r
   ÚlockÚFilesystemLock.lock�   se  € ð ˆØð,ÜœœBŸIšI›KÓ(¨$¯)©)Ô4ðX ˆDŒKØŒJÙøô[ õ *ß“8 §¡¬E¯L©L¼%¿)¹)Ð+DÔ Dõ !Ø—7‘7œeŸl™lÕ*ðÜ& t§y¡yÓ1™øÜ"ô ØŸ7™7¤e§l¡lÔ2÷ %™Hß%›X¨!¯'©'´U·\±\Ô*A÷ $)¡5ØûðúðÜÒ+Ü ¤ S£¨1Ô-ùÜ"ô ØŸ7™7¤e§k¡kÔ1ð&Ü & t§y¡yÕ 1øÜ#*ô &Ø#$§7¡7¬e¯l©lÔ#:÷ %-¦HØ %ûð&úð %*˜Eß$šHØûðúõ  !ØûðU*úsË   …2A ÁH Á;G;Â G;Â4C
Ã	G;Ã
D9ÃD4Ã4G;Ã>D4Ä
D4Ä)G;Ä3D4Ä4D9Ä9G;Ä=EÅG;ÅG1Å&G,ÆFÆG,ÆGÆ'GÇG,Ç
G;ÇGÇGÇG,Ç G;Ç+G,Ç,G1Ç1G;Ç:G;Ç;H c                óâ   € \        V P                  4      p\        V4      \        P                  ! 4       8w  d   \        RV P                  : R24      h\        V P                  4       RV n        R# )z½
Release this lock.

This deletes the directory with the given name.

@raise OSError: Any exception L{os.readlink()} may raise.
@raise ValueError: If the lock is not owned by this process.
zLock z not owned by this processFN)r   r>   r   r#   rC   Ú
ValueErrorr:   rG   )r?   r   s   & r
   ÚunlockÚFilesystemLock.unlockÍ   sP   € ô �t—y‘yÓ!ˆÜˆs‹8”r—y’y“{Ô"Ü˜u T§Y¡Y¡MÐ1KÐLÓMÐMÜˆt�y‰yÔØˆŽr	   )rH   rG   r>   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rH   rG   r@   rI   rM   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r
   r<   r<   w   s+   ø‡ € ñð$ €EØ€Fòò;÷zð r	   r<   c                ó¸   € \        V 4      pRp VP                  4       pV'       d   VP                  4        V'       * #   T'       d   TP                  4        i i ; i)zÇ
Determine if the lock of the given name is held or not.

@type name: C{str}
@param name: The filesystem path to the lock to test

@rtype: C{bool}
@return: True if the lock is held, False otherwise.
N)r<   rI   rM   )r>   Úlr8   s   &  r
   ÚisLockedrY   Ý   sL   € ô 	�tÓ€AØ€FðØ—‘“ˆçØ�H‰HŒJØŒ:Ðø÷ Ø�H‰H�Jð ús	   �> ¾ArY   )rS   r   r#   r   r   Útwisted.python.runtimer   r   r   Ú	isWindowsr   r   r   r:   r   rD   r   Úwin32apir   r   r   ÚImportErrorÚopenr'   r<   rY   Ú__all__r   r	   r
   Ú<module>r`      s¬   ðñó
 Û 	Ý %å +ò+õ à×Ò×Òß<Ó<à�Hà€HðGÛÝ(ð  ÐØ"$Ðò
	Gð €Eòò6ò$÷
cñ còLð( ˜ZÐ
(‚øðK ô ØŠðús   Á	
A8 Á8	BÂB