/usr/lib/python2.6/site-packages/boto/glacier
NameSizeModeActions
concurrent.py172410644editdlrm
concurrent.pyc158210644editdlrm
concurrent.pyo158210644editdlrm
exceptions.py21950644editdlrm
exceptions.pyc18400644editdlrm
exceptions.pyo18400644editdlrm
job.py79990644editdlrm
job.pyc65010644editdlrm
job.pyo65010644editdlrm
layer1.py607960644editdlrm
layer1.pyc597450644editdlrm
layer1.pyo597450644editdlrm
layer2.py37450644editdlrm
layer2.pyc33550644editdlrm
layer2.pyo33550644editdlrm
response.py21930644editdlrm
response.pyc15430644editdlrm
response.pyo15430644editdlrm
utils.py63100644editdlrm
utils.pyc55160644editdlrm
utils.pyo55160644editdlrm
vault.py176010644editdlrm
vault.pyc161530644editdlrm
vault.pyo159890644editdlrm
writer.py96680644editdlrm
writer.pyc97310644editdlrm
writer.pyo97310644editdlrm
__init__.py16850644editdlrm
__init__.pyc9560644editdlrm
__init__.pyo9560644editdlrm
Edit: /usr/lib/python2.6/site-packages/boto/glacier/job.pyo (6501B)
Ñò Å-õSc@sXddkZddkZddklZlZddklZdefd„ƒYZdS(iÿÿÿÿN(tTreeHashDoesNotMatchErrortDownloadArchiveError(ttree_hash_from_strtJobcBs¶eZd(Zd*d+d,d d efd-d.d/d0d1d2d3d4d5d6fZd)d„Zd „Zd)ed!„Zd"„Z ee e i fd#„Z ee e i fd$„Zd%„Zd&„ZRS(7iitActiontactiont ArchiveIdt archive_idtArchiveSizeInBytest archive_sizeit Completedt completedtCompletionDatetcompletion_datet CreationDatet creation_datetInventorySizeInBytestinventory_sizetJobDescriptiont descriptiontJobIdtidtSHA256TreeHashtsha256_treehashtSNSTopict sns_topict StatusCodet status_codet StatusMessagetstatus_messagetVaultARNtarncCsv||_|o5x_|iD]#\}}}t||||ƒqWn.x*|iD]\}}}t|||ƒqOWdS(N(tvaulttResponseDataElementstsetattr(tselfR t response_datat response_namet attr_nametdefault((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyt__init__2s   cCs d|iS(NsJob(%s)(R(R#((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyt__repr__;scCsŠ|iii|ii|i|ƒ}|o[d|joN|iƒ}t|ƒ}|d|jo!td||d|fƒ‚q†n|S(s& This operation downloads the output of the job. Depending on the job type you specified when you initiated the job, the output will be either the content of an archive or a vault inventory. You can download all the job output or download a portion of the output by specifying a byte range. In the case of an archive retrieval job, depending on the byte range you specify, Amazon Glacier returns the checksum for the portion of the data. You can compute the checksum on the client and verify that the values match to ensure the portion you downloaded is the correct data. :type byte_range: tuple :param range: A tuple of integer specifying the slice (in bytes) of the archive you want to receive :type validate_checksum: bool :param validate_checksum: Specify whether or not to validate the associate tree hash. If the response does not contain a TreeHash, then no checksum will be verified. tTreeHashsZThe calculated tree hash %s does not match the expected tree hash %s for the byte range %s(R tlayer1tget_job_outputtnameRtreadRR(R#t byte_rangetvalidate_checksumtresponsetdatatactual_tree_hash((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyt get_output>s   cCs tti|it|ƒƒƒS(N(tinttmathtceilR tfloat(R#t chunk_size((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyt_calc_num_chunksdsc CsX|i|ƒ}t|dƒiiƒ}z&|~}|i|||||ƒWdQXdS(sÆDownload an archive to a file by name. :type filename: str :param filename: The name of the file where the archive contents will be saved. :type chunk_size: int :param chunk_size: The chunk size to use when downloading the archive. :type verify_hashes: bool :param verify_hashes: Indicates whether or not to verify the tree hashes for each downloaded chunk. twbN(R:topent__exit__t __enter__t_download_to_fileob(R#tfilenameR9t verify_hashestretry_exceptionst num_chunkst_[1]t output_file((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pytdownload_to_filegs&cCs,|i|ƒ}|i|||||ƒdS(sÇDownload an archive to a file object. :type output_file: file :param output_file: The file object where the archive contents will be saved. :type chunk_size: int :param chunk_size: The chunk size to use when downloading the archive. :type verify_hashes: bool :param verify_hashes: Indicates whether or not to verify the tree hashes for each downloaded chunk. N(R:R?(R#RER9RARBRC((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pytdownload_to_fileobj}sc Csx–t|ƒD]ˆ}|||d|df}|i||ƒ\}} |o:t|ƒ} | | jotd| | |fƒ‚qˆn|i|ƒq WdS(NisZThe calculated tree hash %s does not match the expected tree hash %s for the byte range %s(tranget_download_byte_rangeRRtwrite( R#tfileobjRCR9RARBtiR/R2texpected_tree_hashR3((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyR?“s   cCsxxtdƒD]T}y3|i|ƒ}|iƒ}|d}||fSWq |j o }q q Xq Wtd||fƒ‚dS(NiR*s/There was an error downloadingbyte range %s: %s(RHR4R.R(R#R/RBt_R1R2RMte((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyRI¢s    ii@N(RsactionN(RRN(Rs archive_sizei(R R N(RRN(RRi(RRN(RsidN(RRN(RRN(RRN(RRN(RsarnN(t__name__t __module__tDefaultPartSizetNonetFalseR!R(R)R4R:tTruetsocketterrorRFRGR?RI(((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyRs4   &  ( R6RVtboto.glacier.exceptionsRRtboto.glacier.utilsRtobjectR(((s4/usr/lib/python2.6/site-packages/boto/glacier/job.pyts