ef8 ZddlmZddlZddlZddlmZmZmZmZm Z GddeZ dS))absolute_importN)LockBase NotLocked NotMyLock LockTimeout AlreadyLockedc:eZdZdZd dZd dZdZdZdZd Z dS) SymlinkLockFilez'Lock access to a file using symlink(2).TNctj||||tj|jd|_dS)Nr)r__init__ospathsplit unique_name)selfrthreadedtimeouts x/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/lockfile/symlinklockfile.pyr zSymlinkLockFile.__init__ s=$h8887==)9::1=c||n|j}tj}| |dkr||z } tj|j|jdS#t $r|rYdS|Ktj|kr4|dkrtd|j ztd|j ztj ||dz ndYnwxYw)NrTz&Timeout waiting to acquire lock for %sz%s is already locked g?) rtimersymlinkr lock_fileOSError i_am_lockingrrr sleep)rrend_times racquirezSymlinkLockFile.acquires' %0''dl9;;  7Q;;  H   4+T^<<<&% M M M$$&& MFF*ty{{X/E/E"Q;;"-/=.2i/8#9#99#00F04 1:#;#;;Jw/Bw||LLLLL M  sAC0A(CCc|std|jz|st d|jzt j|jdS)Nz%s is not lockedz%s is locked, but not by me) is_lockedrrrrrunlinkrrs rreleasezSymlinkLockFile.release6sn~~ G.:;; ;""$$ G9DIEFF F $.!!!!!rcJtj|jSN)rrislinkrr$s rr"zSymlinkLockFile.is_locked=sw~~dn---rctj|jo!tj|j|jkSr')rrr(rreadlinkrr$s rrzSymlinkLockFile.i_am_locking@s8t~..DK//43CC Erctj|jrtj|jdSdSr')rrr(rr#r$s r break_lockzSymlinkLockFile.break_lockDs< 7>>$. ) ) & Idn % % % % % & &r)TNr') __name__ __module__ __qualname____doc__r r r%r"rr,rrr r s11>>>> !!!!F"""...EEE&&&&&rr ) __future__rrrrrrrr r r1rrr4s&&&&&& <&<&<&<&<&h<&<&<&<&<&r