ó U!¶\c@sPddlmZddlmZdefd„ƒYZdefd„ƒYZdS(iÿÿÿÿ(t ClientError(tget_service_module_nametBaseClientExceptionscBs)eZeZd„Zd„Zd„ZRS(cCs ||_dS(s Base class for exceptions object on a client :type code_to_exception: dict :param code_to_exception: Mapping of error codes (strings) to exception class that should be raised when encountering a particular error code. N(t_code_to_exception(tselftcode_to_exception((s9/tmp/pip-install-usGedi/botocore/botocore/errorfactory.pyt__init__scCs|jj||jƒS(sNRetrieves the error class based on the error code This is helpful for identifying the exception class needing to be caught based on the ClientError.parsed_reponse['Error']['Code'] value :type error_code: string :param error_code: The error code associated to a ClientError exception :rtype: ClientError or a subclass of ClientError :returns: The appropriate modeled exception class for that error code. If the error code does not match any of the known modeled exceptions then return a generic ClientError. (RtgetR(Rt error_code((s9/tmp/pip-install-usGedi/botocore/botocore/errorfactory.pyt from_codescCsKg|jjƒD]}|j^q}td||dj|ƒfƒ‚dS(Ns7%r object has no attribute %r. Valid exceptions are: %ss, (Rtvaluest__name__tAttributeErrortjoin(Rtnamet exception_clstexception_cls_names((s9/tmp/pip-install-usGedi/botocore/botocore/errorfactory.pyt __getattr__.s "(R t __module__RRR R(((s9/tmp/pip-install-usGedi/botocore/botocore/errorfactory.pyRs tClientExceptionsFactorycBs#eZd„Zd„Zd„ZRS(cCs i|_dS(N(t_client_exceptions_cache(R((s9/tmp/pip-install-usGedi/botocore/botocore/errorfactory.pyR9scCsB|j}||jkr7|j|ƒ}||j| s'