Merge branch 'starttls-exception' into 'master'
features_starttls/Proceed: raise exception on InvalidCABundle See merge request poezio/slixmpp!196
This commit is contained in:
commit
8bac744009
@ -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 New Issue
Block a user