diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-19 14:27:11 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-19 14:42:46 +0100 |
commit | 291cba284bc79c68caa73c09a382e5bea38375d3 (patch) | |
tree | d9f0f78c0b72a21fc0eb7bd2cfe694663dacc8a8 /synapse | |
parent | Don't always hit get_server_verify_key_v1_direct (diff) | |
download | synapse-291cba284bc79c68caa73c09a382e5bea38375d3.tar.xz |
Handle the case when things return empty but non none things
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/crypto/keyring.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 35f9ac3517..aff69c5f83 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -159,7 +159,7 @@ class Keyring(object): ) with limiter: - if keys is None: + if not keys: try: keys = yield self.get_server_verify_key_v2_direct( server_name, key_ids @@ -171,7 +171,7 @@ class Keyring(object): type(e).__name__, str(e.message), ) - if keys is None: + if not keys: keys = yield self.get_server_verify_key_v1_direct( server_name, key_ids ) |