
                         
   d dl Z d dlZd dlZd dlZd dlZd dlmZ ej                  j                  d      rd Z	nej                  Z	ej                  rd ZeZdZnd Zej                   Zej"                  Zd Zd Zd	 Zd d
lmZ y)    N)sixwinc                     	 t        j                  |       t        j
                  | |       y # t        $ r(}|j                  t        j                  k(  s Y d }~Cd }~ww xY w)N)osremoveOSErrorerrnoENOENTrename)current_filenamenew_filenamees      $lib/third_party/s3transfer/compat.pyrename_filer      sP    	IIl# 			"L1  	77ell*
  +	s   . 	AAAc                 2    t        j                  |       d   S N   )inspectgetfullargspecfuncs    r   accepts_kwargsr   &   s     %%d+A..    c                 2    t        j                  |       d   S r   )r   
getargspecr   s    r   r   r   2   s    !!$'**r   c                     t        | d      r| j                         S t        | d      r t        | d      r	 | j                  dd       yy# t        t        f$ r Y yw xY w)zBackwards compat function to determine if a fileobj is seekable

    :param fileobj: The file-like object to determine if seekable

    :returns: True, if seekable. False, otherwise.
    seekableseektellr      TF)hasattrr   r   r   IOErrorfileobjs    r   r   r   9   sf     w
#!! 
&	!ggv&>	LLA
 	 ! 		s   A
 
AAc                 R    t        | d      r| j                         S t        | d      S )zDetermines whether or not a file-like object is readable.

    :param fileobj: The file-like object to determine if readable

    :returns: True, if readable. False otherwise.
    readableread)r!   r&   r#   s    r   r&   r&   Q   s*     w
#!!7F##r   c                     t        t        d      r&t        j                  | j                         d|       y | j	                  |       y )Nposix_fallocater   )r!   r   r)   filenotruncate)r$   sizes     r   	fallocater-   ^   s4    r$%
7>>+Q5r   )BaseManager)r   sysr   r	   socketbotocore.compatr   platform
startswithr   r   PY3r   ConnectionErrorSOCKET_ERRORMAXINTerrormaxintr   r&   r-   multiprocessing.managersr.    r   r   <module>r<      s     
 	    <<5!
2 ))K77/ #LF+ <<LZZF0
$ 1r   