def _log_response(self, segment, response):
if response.code[0] in ('0', '1'):
log_target = logger.info
- elif response.code[0] in ('3'):
+ elif response.code[0] in ('3',):
log_target = logger.warning
else:
log_target = logger.error
self.challenge_html = bleach.clean(
self.challenge,
tags=['br', 'p', 'b', 'i', 'u', 'ul', 'ol', 'li'],
- attributes=[],
+ attributes={},
)
else:
self.challenge_html = bleach.clean(self.challenge, tags=[])
if tan_process == '1':
seg.segment_type = orig_seg.header.type
account_ = getattr(orig_seg, 'account', None)
- if isinstance(account, KTI1):
- seg.account = account
+ if isinstance(account_, KTI1):
+ seg.account = account_
raise NotImplementedError("TAN-Process 1 not implemented")
if tan_process in ('1', '3', '4') and \
class FinTSDialog:
- def __init__(self, client=None, lazy_init=False, enc_mechanism=None, auth_mechanisms=[]):
+ def __init__(self, client=None, lazy_init=False, enc_mechanism=None, auth_mechanisms=None):
self.client = client
- self.next_message_number = dict((v, 1) for v in MessageDirection)
+ self.next_message_number = dict((v, 1) for v in MessageDirection)
self.messages = dict((v, {}) for v in MessageDirection)
- self.auth_mechanisms = auth_mechanisms
+ self.auth_mechanisms = auth_mechanisms or []
self.enc_mechanism = enc_mechanism
self.open = False
self.need_init = True