a °…b“ ã@sÐddlZddlmZGdd„deƒZGdd„deƒZGdd„dejeƒZGd d „d ejeƒZGd d „d ejeƒZGd d„dej eƒZ Gdd„deƒZ Gdd„de ƒZ Gdd„deƒZ e eeeddœdd„ZdS)éN)ÚTypec@seZdZdZdS)Ú CryptoErrorz4 Base exception for all nacl related errors N©Ú__name__Ú __module__Ú __qualname__Ú__doc__©r r ú6/tmp/pip-target-98j97qn4/lib/python/nacl/exceptions.pyrsrc@seZdZdZdS)ÚBadSignatureErrorzD Raised when the signature was forged or otherwise corrupt. Nrr r r r r sr c@s eZdZdS)Ú RuntimeErrorN©rrrr r r r r $sr c@s eZdZdS)ÚAssertionErrorNr r r r r r(src@s eZdZdS)Ú TypeErrorNr r r r r r,src@s eZdZdS)Ú ValueErrorNr r r r r r0src@s eZdZdS)ÚInvalidkeyErrorNr r r r r r4src@s eZdZdS)ÚCryptPrefixErrorNr r r r r r8src@seZdZdZdS)ÚUnavailableErrorzž is a subclass of :class:`~nacl.exceptions.RuntimeError`, raised when trying to call functions not available in a minimal build of libsodium. Nrr r r r r<sr)ÚcondÚargsÚkwdsÚreturncOsFd}| dt¡}|r.t| t| ¡dƒ¡ƒ‚|dur:dS||Ž‚dS)a„ Return if a condition is true, otherwise raise a caller-configurable :py:class:`Exception` :param bool cond: the condition to be checked :param sequence args: the arguments to be passed to the exception's constructor The only accepted named parameter is `raising` used to configure the exception to be raised if `cond` is not `True` z8check_condition() got an unexpected keyword argument {0}ÚraisingrTN)ÚpoprrÚformatÚreprÚpopitem)rrrZ _CHK_UNEXPrr r r ÚensureFs  r)ÚbuiltinsÚtypingrÚ Exceptionrr r rrrrrrÚboolÚobjectrr r r r Ús