+
     h  c                   s*    R t ^ RIHt  ! R R4      tR# )a  The error checking chain is a list of status word
(sw1, sw2) error check strategies.

__author__ = "https://www.gemalto.com/"

Copyright 2001-2012 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com

This file is part of pyscard.

pyscard is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

pyscard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with pyscard; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
)exc_infoc                   sB   a  ] tR t^t o RtR tR tR tR tR t	Rt
V tR# )	ErrorCheckingChaina  The error checking chain is a list of response apdu status word
(sw1, sw2) error check strategies. Each strategy in the chain is
called until an error is detected. A L{smartcard.sw.SWExceptions}
exception is raised when an error is detected. No exception is
raised if no error is detected.

Implementation derived from Bruce Eckel, Thinking in Python. The
L{ErrorCheckingChain} implements the Chain Of Responsibility design
pattern.
c                sb    W n         Wn        V P                  P                  V 4       . V n        R# )zCconstructor. Appends a strategy to the L{ErrorCheckingChain}
chain.N)strategychainappendexcludes)selfr   r   s   &&&F/usr/lib64/python3.14/site-packages/smartcard/sw/ErrorCheckingChain.py__init__ZErrorCheckingChain.__init__)   s'     !


$    c                s    V P                   P                  V 4      pV P                  4       '       g   V P                   V^,           ,          # R# )z%Returns next error checking strategy.N)r   indexend)r   Zlocations   & r   nextZErrorCheckingChain.next1   s;     ::##D)xxzz::hl++ r	   c                s    V P                   P                  V4       V P                  4       '       d   R# V P                  4       P	                  V4       R# )a  Add an exception filter to the error checking chain.

@param exClass:    the exception to exclude, e.g.
L{smartcard.sw.SWExceptions.WarningProcessingException} A filtered
exception will not be raised when the sw1,sw2 conditions that
would raise the exception are met.
N)r   r   r   r   addFilterException)r   ZexClasss   &&r   r   Z%ErrorCheckingChain.addFilterException8   s8     	W%88::		&&w/r	   c                sr    V P                   P                  V 4      ^,           \        V P                   4      8  # )zEReturns True if this is the end of the error checking
strategy chain.)r   r
   Zlen)r   s   &r   r   ZErrorCheckingChain.endF   s+     zz%)S_<<r	   c                s,    V P                  WV4       T P	                  4       '       d   R# T P                  4       ! YT4      #   \        T P                  4       d7   pT P                   F   pT\        4       ^ ,          8X  g   K    Rp?R# 	  h Rp?ii ; i)z8Called to test data, sw1 and sw2 for error on the chain.N)r   Ztupler   r    r   r   )r   ZdataZsw1Zsw2ZexcZ	exceptions   &&&&  r   __call__ZErrorCheckingChain.__call__K   sy    	MM$S) 88::yy{4c**! T]]# 	 "]]	
1- + 	s#   A B"BBBB)r   r   r   N)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r   r   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s(     	,0=
+ +r	   r   N)r   Zsysr    r   ) r	   r   <module>r      s   2 B+ B+r	   