U á€C^Þã`@s¾dZddlZddlZeedejƒZeedejƒZeedejƒZeedejƒZ eedej ƒZ e e e e  eej¡e  eej¡e  eej¡eee  ee¡e  eej¡e e  eej¡e  ee¡e e e  eej¡e  eej¡e  eej¡e  ee¡e  ee ¡e e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e e  eej¡e  eej¡e e  eej¡e  eej¡e  eej¡e e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e  ee¡e  eej¡e  eej¡e  eej¡e  ee¡e  ee¡e  ee¡e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡eeeeeee  eej¡e e  eej¡e  ee ¡e  eej¡e  ee ¡e  eej¡e  eej¡ee e  eej¡e e  eej¡e  eej¡e  ee ¡e  eej¡e  eej¡e  eej¡e  eej¡e  eej¡e  ee ¡e  ee ¡e  eej¡e ee  eej¡e  eej¡e  eej¡e  eej¡e  ee ¡e  eej¡e  eej¡dœ]Zd d d „ZdS) z‰S3 error codes adapted into more natural Python ones. Adapted from: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html éNÚ ENAMETOOLONGÚ ENOTEMPTYÚEMSGSIZEÚ EREMOTEIOÚEREMCHG)]Z AccessDeniedZAccountProblemZAllAccessDisabledZAmbiguousGrantByEmailAddressZAuthorizationHeaderMalformedZ BadDigestZBucketAlreadyExistsZBucketAlreadyOwnedByYouZBucketNotEmptyZCredentialsNotSupportedZCrossLocationLoggingProhibitedZEntityTooSmallZEntityTooLargeZ ExpiredTokenZ"IllegalLocationConstraintExceptionZ'IllegalVersioningConfigurationExceptionZIncompleteBodyZ#IncorrectNumberOfFilesInPostRequestZInlineDataTooLargeZ InternalErrorZInvalidAccessKeyIdZInvalidAddressingHeaderZInvalidArgumentZInvalidBucketNameZInvalidBucketStateZ InvalidDigestZInvalidEncryptionAlgorithmErrorZInvalidLocationConstraintZInvalidObjectStateZ InvalidPartZInvalidPartOrderZ InvalidPayerZInvalidPolicyDocumentZ InvalidRangeZInvalidRequestZInvalidSecurityZInvalidSOAPRequestZInvalidStorageClassZInvalidTargetBucketForLoggingZ InvalidTokenZ InvalidURIZKeyTooLongErrorZMalformedACLErrorZMalformedPOSTRequestZ MalformedXMLZMaxMessageLengthExceededZ!MaxPostPreDataLengthExceededErrorZMetadataTooLargeZMethodNotAllowedZMissingAttachmentZMissingContentLengthZMissingRequestBodyErrorZMissingSecurityElementZMissingSecurityHeaderZNoLoggingStatusForKeyZ NoSuchBucketZNoSuchBucketPolicyZ NoSuchKeyZNoSuchLifecycleConfigurationZ NoSuchUploadZ NoSuchVersionÚNotImplementedZ NotSignedUpZOperationAbortedZPermanentRedirectZPreconditionFailedZRedirectZRestoreAlreadyInProgressZRequestIsNotMultiPartContentZRequestTimeoutZRequestTimeTooSkewedZRequestTorrentOfBucketErrorZSignatureDoesNotMatchZServiceUnavailableZSlowDownZTemporaryRedirectZTokenRefreshRequiredZTooManyBucketsZUnexpectedContentZUnresolvableGrantByEmailAddressZUserKeyMustBeSpecifiedZ301Z307Z400Z403Z404Z405Z409Z412Z416Ú500Z501Z503cOsb|jd d¡}t |¡}|s8ttj|p.t|ƒf|žŽS|sR|jd dt|ƒ¡}||f|ž|ŽS)a±Convert a ClientError exception into a Python one. Parameters ---------- error : botocore.exceptions.ClientError The exception returned by the boto API. message : str An error message to use for the returned exception. If not given, the error message returned by the server is used instead. *args, **kwargs : Additional arguments to pass to the exception constructor, after the error message. Useful for passing the filename arguments to ``IOError``. Returns ------- An instantiated exception ready to be thrown. If the error code isn't recognized, an IOError with the original error message is returned. ÚErrorZCodeÚMessage)ÚresponseÚgetÚERROR_CODE_TO_EXCEPTIONÚIOErrorÚerrnoÚEIOÚstr)ÚerrorÚmessageÚargsÚkwargsÚcodeÚ constructor©rú-/tmp/pip-install-6_kvzl1k/s3fs/s3fs/errors.pyÚtranslate_boto_errorss r)N)Ú__doc__rÚ functoolsÚgetattrÚEINVALrrrrrÚENOENTrÚPermissionErrorÚpartialrÚFileExistsErrorÚEPERMÚFileNotFoundErrorZENOSYSZEBUSYÚ TimeoutErrorr rrrrrÚsÌ                                                                     £a