diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-10-30 11:10:17 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-10-30 11:10:17 +0000 |
commit | 7d709542ca3ae3c69a46f3d9dc383cf9c4dfab95 (patch) | |
tree | 155997683ee2d493e53218a725eb2b85b526fbe9 /synapse/util | |
parent | SYWEB-112: Use the right user ID when determining invites for display on the ... (diff) | |
download | synapse-7d709542ca3ae3c69a46f3d9dc383cf9c4dfab95.tar.xz |
Fix pep8 warnings
Diffstat (limited to '')
-rw-r--r-- | synapse/util/distributor.py | 3 | ||||
-rw-r--r-- | synapse/util/emailutils.py | 6 | ||||
-rw-r--r-- | synapse/util/jsonobject.py | 3 |
3 files changed, 7 insertions, 5 deletions
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] |