�
���cc @ sw d d l Z d d l Z d d l m Z m Z m Z d d l m Z d d l m Z d e f d � � YZ
d g Z d S( i����N( t EACCESt EEXISTt ENOENTi ( t BaseFileLock( t raise_on_exist_ro_filet SoftFileLockc B s e Z d Z d � Z d � Z RS( s. Simply watches the existence of the lock file.c C s� t | j � t j t j Bt j Bt j B} y t j | j | � } Wn^ t k
r� } | j t
k rh q� | j t k r} � q� | j t k r� t
j d k r� � q� n
X| | _ d S( Nt win32( R t
_lock_filet ost O_WRONLYt O_CREATt O_EXCLt O_TRUNCt opent OSErrort errnoR R R t syst platformt
_lock_file_fd( t selft modet fdt exception( ( s2 /usr/lib/python2.7/site-packages/filelock/_soft.pyt _acquire s
c C sE t j | j � d | _ y t j | j � Wn t k
r@ n Xd S( N( R t closeR t Nonet removeR R ( R ( ( s2 /usr/lib/python2.7/site-packages/filelock/_soft.pyt _release! s
( t __name__t
__module__t __doc__R R ( ( ( s2 /usr/lib/python2.7/site-packages/filelock/_soft.pyR s ( R R R R R R t _apiR t _utilR R t __all__( ( ( s2 /usr/lib/python2.7/site-packages/filelock/_soft.pyt <module> s "