diff --git a/synapse/util/distributor.py b/synapse/util/distributor.py
index 1de50e049f..eddbe5837f 100644
--- a/synapse/util/distributor.py
+++ b/synapse/util/distributor.py
@@ -42,7 +42,8 @@ class Distributor(object):
if name in self.signals:
raise KeyError("%r already has a signal named %s" % (self, name))
- self.signals[name] = Signal(name,
+ self.signals[name] = Signal(
+ name,
suppress_failures=self.suppress_failures,
)
diff --git a/synapse/util/emailutils.py b/synapse/util/emailutils.py
index cdb0abd7ea..7038cab6c2 100644
--- a/synapse/util/emailutils.py
+++ b/synapse/util/emailutils.py
@@ -42,8 +42,8 @@ def send_email(smtp_server, from_addr, to_addr, subject, body):
EmailException if there was a problem sending the mail.
"""
if not smtp_server or not from_addr or not to_addr:
- raise EmailException("Need SMTP server, from and to addresses. Check " +
- "the config to set these.")
+ raise EmailException("Need SMTP server, from and to addresses. Check"
+ " the config to set these.")
msg = MIMEMultipart('alternative')
msg['Subject'] = subject
@@ -68,4 +68,4 @@ def send_email(smtp_server, from_addr, to_addr, subject, body):
twisted.python.log.err()
ese = EmailException()
ese.cause = origException
- raise ese
\ No newline at end of file
+ raise ese
diff --git a/synapse/util/jsonobject.py b/synapse/util/jsonobject.py
index 6c99705747..c91eb897a8 100644
--- a/synapse/util/jsonobject.py
+++ b/synapse/util/jsonobject.py
@@ -13,9 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
import copy
+
class JsonEncodedObject(object):
""" A common base class for defining protocol units that are represented
as JSON.
@@ -89,6 +89,7 @@ class JsonEncodedObject(object):
def __str__(self):
return "(%s, %s)" % (self.__class__.__name__, repr(self.__dict__))
+
def _encode(obj):
if type(obj) is list:
return [_encode(o) for o in obj]
|