Replace all remaining six usage with native Python 3 equivalents (#7704)

This commit is contained in:
Dagfinn Ilmari Mannsåker 2020-06-16 13:51:47 +01:00 committed by GitHub
parent 98c4e35e3c
commit a3f11567d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 111 additions and 237 deletions

View file

@ -16,12 +16,10 @@
import abc
import logging
import re
import urllib
from inspect import signature
from typing import Dict, List, Tuple
from six import raise_from
from six.moves import urllib
from twisted.internet import defer
from synapse.api.errors import (
@ -220,7 +218,7 @@ class ReplicationEndpoint(object):
# importantly, not stack traces everywhere)
raise e.to_synapse_error()
except RequestSendFailed as e:
raise_from(SynapseError(502, "Failed to talk to master"), e)
raise SynapseError(502, "Failed to talk to master") from e
return result