From be45dc148a3586149f58944788f3e9bceea4f410 Mon Sep 17 00:00:00 2001 From: Tomas Touceda Date: Thu, 25 Apr 2013 11:22:21 -0300 Subject: Catch the case where there's no pubkey for a user --- src/leap/mx/couchdbhelper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/leap/mx') diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py index 2bbca77..2f6b548 100644 --- a/src/leap/mx/couchdbhelper.py +++ b/src/leap/mx/couchdbhelper.py @@ -138,7 +138,10 @@ class ConnectedCouchDB(client.CouchDB): for row in result["rows"]: if row["key"] == alias: uuid = row["id"] - self._cache[uuid] = row["doc"]["public_key"] + try: + self._cache[uuid] = row["doc"]["public_key"] + except: + pass # no public key for this user return uuid return None -- cgit v1.2.3