features_starttls/Proceed: raise exception on InvalidCABundle
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
f7902d056e
commit
88d2f5dae4
1 changed files with 11 additions and 1 deletions
|
@ -3,8 +3,12 @@
|
||||||
# Copyright (C) 2011 Nathanael C. Fritz
|
# Copyright (C) 2011 Nathanael C. Fritz
|
||||||
# This file is part of Slixmpp.
|
# This file is part of Slixmpp.
|
||||||
# See the file LICENSE for copying permission.
|
# See the file LICENSE for copying permission.
|
||||||
from slixmpp.xmlstream import StanzaBase, ElementBase
|
|
||||||
from typing import Set, ClassVar
|
from typing import Set, ClassVar
|
||||||
|
from slixmpp.xmlstream import StanzaBase, ElementBase
|
||||||
|
from slixmpp.xmlstream.xmlstream import InvalidCABundle
|
||||||
|
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class STARTTLS(StanzaBase):
|
class STARTTLS(StanzaBase):
|
||||||
|
@ -36,6 +40,12 @@ class Proceed(StanzaBase):
|
||||||
namespace = 'urn:ietf:params:xml:ns:xmpp-tls'
|
namespace = 'urn:ietf:params:xml:ns:xmpp-tls'
|
||||||
interfaces: ClassVar[Set[str]] = set()
|
interfaces: ClassVar[Set[str]] = set()
|
||||||
|
|
||||||
|
def exception(self, e: Exception) -> None:
|
||||||
|
log.exception('Error handling {%s}%s stanza',
|
||||||
|
self.namespace, self.name)
|
||||||
|
if isinstance(e, InvalidCABundle):
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
class Failure(StanzaBase):
|
class Failure(StanzaBase):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue