exceptions: Fix python 3.7 compatibility
This commit is contained in:
parent
18c3db4d6e
commit
2d02ef9bcb
@ -5,7 +5,7 @@
|
|||||||
# :copyright: (c) 2011 Nathanael C. Fritz
|
# :copyright: (c) 2011 Nathanael C. Fritz
|
||||||
# :license: MIT, see LICENSE for more details
|
# :license: MIT, see LICENSE for more details
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
from .types import ErrorConditions, ErrorTypes, JidStr
|
from .types import ErrorConditions, ErrorTypes, JidStr
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ class PresenceError(XMPPError):
|
|||||||
self.presence = pres
|
self.presence = pres
|
||||||
|
|
||||||
|
|
||||||
_DEFAULT_ERROR_TYPES: dict[ErrorConditions, ErrorTypes] = {
|
_DEFAULT_ERROR_TYPES: Dict[ErrorConditions, ErrorTypes] = {
|
||||||
"bad-request": "modify",
|
"bad-request": "modify",
|
||||||
"conflict": "cancel",
|
"conflict": "cancel",
|
||||||
"feature-not-implemented": "cancel",
|
"feature-not-implemented": "cancel",
|
||||||
@ -145,4 +145,4 @@ _DEFAULT_ERROR_TYPES: dict[ErrorConditions, ErrorTypes] = {
|
|||||||
"subscription-required": "auth",
|
"subscription-required": "auth",
|
||||||
"undefined-condition": "cancel",
|
"undefined-condition": "cancel",
|
||||||
"unexpected-request": "modify",
|
"unexpected-request": "modify",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user