2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index eb6de8ba72..026134ae26 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -290,7 +290,7 @@ class HttpPusher(Pusher):
if rejected is False:
return False
- if isinstance(rejected, list) or isinstance(rejected, tuple):
+ if isinstance(rejected, (list, tuple)):
for pk in rejected:
if pk != self.pushkey:
# for sanity, we only remove the pushkey if it
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py
index 5f7a6dd1d3..5ca2e71e60 100644
--- a/synapse/util/frozenutils.py
+++ b/synapse/util/frozenutils.py
@@ -36,7 +36,7 @@ def freeze(o):
def unfreeze(o):
if isinstance(o, (dict, frozendict)):
- return dict({k: unfreeze(v) for k, v in o.items()})
+ return {k: unfreeze(v) for k, v in o.items()}
if isinstance(o, (bytes, str)):
return o
|