diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-07-09 16:09:20 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-07-09 16:09:20 +1000 |
commit | 49af4020190eae6b0c65897d96cd2be286364d2b (patch) | |
tree | 9a51932bae195f097e30b2b2279d23be5a29ca3c /synapse/handlers/federation.py | |
parent | Add an isort configuration (#3463) (diff) | |
download | synapse-49af4020190eae6b0c65897d96cd2be286364d2b.tar.xz |
run isort
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 13117d70fe..d3ecebd29f 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -20,38 +20,42 @@ import itertools import logging import sys -from signedjson.key import decode_verify_key_bytes -from signedjson.sign import verify_signed_json import six -from six.moves import http_client from six import iteritems -from twisted.internet import defer +from six.moves import http_client + +from signedjson.key import decode_verify_key_bytes +from signedjson.sign import verify_signed_json from unpaddedbase64 import decode_base64 -from ._base import BaseHandler +from twisted.internet import defer +from synapse.api.constants import EventTypes, Membership, RejectedReason from synapse.api.errors import ( - AuthError, FederationError, StoreError, CodeMessageException, SynapseError, + AuthError, + CodeMessageException, FederationDeniedError, + FederationError, + StoreError, + SynapseError, ) -from synapse.api.constants import EventTypes, Membership, RejectedReason -from synapse.events.validator import EventValidator -from synapse.util import unwrapFirstError, logcontext -from synapse.util.metrics import measure_func -from synapse.util.logutils import log_function -from synapse.util.async import Linearizer -from synapse.util.frozenutils import unfreeze from synapse.crypto.event_signing import ( - compute_event_signature, add_hashes_and_signatures, + add_hashes_and_signatures, + compute_event_signature, ) +from synapse.events.utils import prune_event +from synapse.events.validator import EventValidator from synapse.state import resolve_events_with_factory from synapse.types import UserID, get_domain_from_id - -from synapse.events.utils import prune_event - +from synapse.util import logcontext, unwrapFirstError +from synapse.util.async import Linearizer +from synapse.util.distributor import user_joined_room +from synapse.util.frozenutils import unfreeze +from synapse.util.logutils import log_function +from synapse.util.metrics import measure_func from synapse.util.retryutils import NotRetryingDestination -from synapse.util.distributor import user_joined_room +from ._base import BaseHandler logger = logging.getLogger(__name__) |