PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  lYpA@srdZddlZddlZddlZddlZddlZddlZyddlZ[dZWne k rdZYnXyddl Z [ dZ Wne k rdZ YnXyddl Z [ dZ Wne k rdZ YnXyddlmZWne k rdZYnXyddlmZWne k rGdZYnXddd d d d d ddddddddddddddddddgZGd ddeZGd!ddeZGd"ddeZGd#ddeZGd$d%d%eZGd&d'd'eZdd*dZd+d,Zd-dd.dZd-dd/d Zeed0rd-dd1d2Z n d3d2Z d-dd4d Z!d-dd5d Z"d-dd6d Z#d7dZ$dde#dd8d Z%d9d:Z&d;d<Z'ej(ejej)ej*hej+koFej,ej-koFejej.kZ/ddd=dZ0e/e0_1d>d?Z2e#d@dZ3dAdBZ4dCdDZ5dEdFZ6dGddddddHdIZ7ddddJdKZ8dLe7dgdNfiZ9ere7dgdOfe9dPd_d`Z?ddZdadZ@dbdZAdcddZBdedfZCdgdhZDdLdigeDgdNfdRdjgeCgdQfiZEerLdkdlgeDgdOfeEdP._nopcstt|S)N)getattrr.)rR)rXr r!lookupszcopystat..lookupcs)tt|}|tjkr%|SS)N)rYr.supports_follow_symlinks)rRrA)rXr r!rZsr:utimerDst_flagschflags EOPNOTSUPPrK)r_rK)r.r/r=r:rFr< st_atime_ns st_mtime_nsNotImplementedErrorr-r]r0rJrYrT) r3r4r6followrZrBmodewhyerrr )rXr!rs,+!   'cCs]tjj|r3tjj|tjj|}t||d|t||d||S)a3Copy data and mode bits ("cp src dst"). Return the file's destination. The destination may be a directory. If follow_symlinks is false, symlinks won't be followed. This resembles GNU's "cp -P src dst". If source and destination are the same file, a SameFileError will be raised. r6)r.r/isdirjoinbasenamerr)r3r4r6r r r!rs !cCs]tjj|r3tjj|tjj|}t||d|t||d||S)zCopy data and all stat info ("cp -p src dst"). Return the file's destination." The destination may be a directory. If follow_symlinks is false, symlinks won't be followed. This resembles GNU's "cp -P src dst". r6)r.r/rgrhrirr)r3r4r6r r r!r s !csfdd}|S)zFunction that can be used as copytree() ignore parameter. Patterns is a sequence of glob-style patterns that are used to exclude filescs:g}x'D]}|jtj||q Wt|S)N)extendfnmatchfilterset)r/rP ignored_namespattern)patternsr r!_ignore_patterns s z)ignore_patterns.._ignore_patternsr )rprqr )rpr!rscCsstj|}|dk r-|||}n t}tj|g}x|D]} | |kreqPtjj|| } tjj|| } ytjj| r7tj| } |rtj| | t | | d| qotjj |  r|rwPtjj | r't | | |||qo|| | n8tjj | rbt | | |||n || | WqPt k r} z|j| jdWYdd} ~ XqPtk r}z!|j| | t|fWYdd}~XqPXqPWyt ||WnYtk r\}z9t|dddkrJ|j||t|fWYdd}~XnX|rot ||S)aRecursively copy a directory tree. The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, the contents of the files pointed to by symbolic links are copied. If the file pointed by the symlink doesn't exist, an exception will be added in the list of errors raised in an Error exception at the end of the copy process. You can set the optional ignore_dangling_symlinks flag to true if you want to silence this exception. Notice that this has no effect on platforms that don't support os.symlink. The optional ignore argument is a callable. If given, it is called with the `src` parameter, which is the directory being visited by copytree(), and `names` which is the list of `src` contents, as returned by os.listdir(): callable(src, names) -> ignored_names Since copytree() is called recursively, the callable will be called once for each directory that is copied. It returns a list of names relative to the `src` directory that should not be copied. The optional copy_function argument is a callable that will be used to copy each file. It will be called with the source path and the destination path as arguments. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. Nr6rwinerror)r.listdirrmmakedirsr/rhr=r?r>rexistsrgr r rjrUr0appendstrrY)r3r4symlinksignore copy_functionignore_dangling_symlinksrPrnerrorsrRsrcnamedstnamelinktorfrer r r!r sL$      &3/ c$Csy"tjj|r!tdWn2tk rV|tjj|tjdSYnXg}ytj|}Wn+tk r|tj|tjYnXx|D]}tjj||}ytj|j }Wntk rd}YnXt j |rt ||qytj |Wqtk rN|tj |tjYqXqWytj|Wn+tk r|tj|tjYnXdS)Nz%Cannot call rmtree on a symbolic linkr)r.r/r=r0sysexc_inforsrhrEr<r:S_ISDIR_rmtree_unsafeunlinkrmdir)r/onerrorrPrRfullnamerdr r r!rks6       " rc 0Cs@g}ytj|}WnGtk rb}z'||_|tj|tjWYdd}~XnXx|D]}tjj||}y(tj|d|dd}|j }Wntk rd}YnXtj |rytj |tj d|} Wn+tk r#|tj |tjYq8Xztjj |tj| rt| ||ytj|d|Wqtk r|tj|tjYqXnAytdWn.tk r|tjj|tjYnXWdtj| Xqjytj|d|Wqjtk r7|tj|tjYqjXqjWdS)Ndir_fdr6Frz%Cannot call rmtree on a symbolic link)r.rsr0filenamerrr/rhr:r<rr@O_RDONLYsamestatfstat_rmtree_safe_fdrr=closer) topfdr/rrPrfrRrorig_strddirfdr r r!rsD ,      ! % rc!Cs|rdd}n|dkr-dd}trt|trQtj|}ytj|}Wn/tk r|tj|tjdSYnXytj |tj }Wn/tk r|tj|tjdSYnXztj j |tj |rTt|||ytj|Wqtk rP|tj|tjYqXnAytdWn.tk r|tj j|tjYnXWdtj|Xn t||SdS)aRecursively delete a directory tree. If ignore_errors is set, errors are ignored; otherwise, if onerror is set, it is called to handle the error with arguments (func, path, exc_info) where func is platform and implementation dependent; path is the argument to that function that caused it to fail; and exc_info is a tuple returned by sys.exc_info(). If ignore_errors is false and onerror is None, an exception is raised. cWsdS)Nr )rUr r r!rszrmtree..onerrorNcWsdS)Nr )rUr r r!rsz%Cannot call rmtree on a symbolic link)_use_fd_functions isinstancebytesr.fsdecoderE Exceptionrrr@rr/rrrrr0r=rr)r/ ignore_errorsrrfdr r r!r s<        ! %cCs5tjjtjjpd}tjj|j|S)N)r.r/sepaltseprirstrip)r/rr r r! _basenamesrc Cs]|}tjj|rxt||r;tj||dStjj|t|}tjj|rxtd|ytj||Wnt k rXtjj |rtj |}tj ||tj |nwtjj|r:t||rtd||ft||d|ddt|n|||tj |YnX|S)a+Recursively move a file or directory to another location. This is similar to the Unix "mv" command. Return the file or directory's destination. If the destination is a directory or a symlink to a directory, the source is moved inside the directory. The destination path must not already exist. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If the destination is on our current filesystem, then rename() is used. Otherwise, src is copied to the destination and then removed. Symlinks are recreated under the new name if os.rename() fails because of cross filesystem renames. The optional `copy_function` argument is a callable that will be used to copy the source or it will be delegated to `copytree`. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. Nz$Destination path '%s' already existsz.Cannot move a directory '%s' into itself '%s'.rzrxT)r.r/rgr5renamerhrrur r0r=r?r>r _destinsrcr r )r3r4rzreal_dstrr r r!r s2   cCs{tjj|}tjj|}|jtjjsI|tjj7}|jtjjsn|tjj7}|j|S)N)r.r/r2endswithr startswith)r3r4r r r!r2src Cs_tdks|dkrdSyt|}Wntk rFd}YnX|dk r[|dSdS)z"Returns a gid, given a group name.N)rKeyError)rRresultr r r!_get_gid;s   rc Cs_tdks|dkrdSyt|}Wntk rFd}YnX|dk r[|dSdS)z"Returns an uid, given a user name.Nr)rr)rRrr r r!_get_uidGs   rgzipc s|dkrd}nftr0|dkr0d}nKtrK|dkrKd}n0trf|dkrfd}ntdj|d dl} |rd |nd} |d | } tjj| } | rtjj |  r|dk r|j d | |stj | |dk r|j d t t fdd} |s| j| d|}z|j|d| Wd|jX| S)aCreate a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "bzip2", "xz", or None. 'owner' and 'group' can be used to define an owner and a group for the archive that is being built. If not provided, the current owner and group will be used. The output tar file will be named 'base_name' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2", or ".xz"). Returns the output filename. Nrrgzbzip2bz2xzzCbad value for 'compress', or compression format not supported : {0}r.z.tarz creating %szCreating tar archivecs@dk r|_|_dk r<|_|_|S)N)gidgnameuiduname)tarinfo)rgroupownerrr r! _set_uid_gids      z#_make_tarball.._set_uid_gidzw|%srl)_ZLIB_SUPPORTED_BZ2_SUPPORTED_LZMA_SUPPORTED ValueErrorr9tarfiler.r/dirnameruinfortrrr@addr) base_namebase_dircompressverbosedry_runrrloggertar_compressionr compress_ext archive_name archive_dirrtarr )rrrrr! _make_tarballSs<                rc Csddl}|d}tjj|}|rptjj| rp|dk r]|jd||sptj||dk r|jd|||s|j|dd|jK}tjj |} | tj kr|j | | |dk r|jd| xtj |D]\} } } xat | D]S} tjj tjj| | } |j | | |dk r,|jd| q,Wxm| D]e} tjj tjj| | } tjj| r|j | | |dk r|jd| qWqWWdQRX|S) zCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Returns the name of the output zip file. rNz.zipz creating %sz#creating '%s' and adding '%s' to itw compressionz adding '%s')zipfiler.r/rrurrtZipFile ZIP_DEFLATEDnormpathcurdirr'walksortedrhisfile)rrrrrr zip_filenamerzfr/dirpathdirnames filenamesrRr r r! _make_zipfiles@        !  ! rrrzuncompressed tar filezgzip'ed tar-filegztarzZIP fileziprzbzip2'ed tar-filebztarrzxz'ed tar-fileZxztarcCs'ddtjD}|j|S)zReturns a list of supported formats for archiving and unarchiving. Each element of the returned sequence is a tuple (name, description) cSs&g|]\}}||dfqS)rr ).0rRregistryr r r! s z'get_archive_formats..)_ARCHIVE_FORMATSitemssort)formatsr r r!rs  rcCs|dkrg}t|s.td|t|ttfsOtdxB|D]:}t|ttf st|dkrVtdqVW|||ft|.)_UNPACK_FORMATSrr)rr r r!r*s  c Csi}x9tjD]+\}}x|dD]}|||._access_checkNPATHwin32rPATHEXTrc3s*|] }jj|jVqdS)N)lowerr)rr)cmdr r! lszwhich..csg|]}|qSr r )rr)r4r r!ros zwhich..)r.r/rr%getdefpathrpathseprplatformrinsertanyrmr1rrh) r4rdr/r/pathextfilesseendirnormdirthefilerRr )r4r!rBs8  !        i@)rN)rr)rr)rr)r!r")Sr"r.rr:rk collectionsrJzlibr ImportErrorrrZlzmarpwdrgrpr__all__r0r rrrr#rr$rr5rrr-rTrrr rr rrr@rrsupports_dir_fdrs supports_fdr[rr avoids_symlink_attacksrr rrrrrrrrrrrrrrrrr rr rrv namedtuplerrrRrrrF_OKX_OKrr r r r!s                           6 Y ! , 5  8 @-         6    "     %     -