Mercurial > libervia-backend
changeset 2120:4d9aeae5d9d0
quick frontend (contact list): fixed cached key removal
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 15 Jan 2017 16:00:40 +0100 |
parents | 469702b46768 |
children | df5cb9e7d0b7 |
files | frontends/src/quick_frontend/quick_contact_list.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_contact_list.py Sun Jan 15 16:00:40 2017 +0100 +++ b/frontends/src/quick_frontend/quick_contact_list.py Sun Jan 15 16:00:40 2017 +0100 @@ -395,7 +395,11 @@ cache_attr = cache[C.CONTACT_RESOURCES].setdefault(entity.resource, {}) if entity.resource else cache for attribute, value in attributes.iteritems(): if value is None: - cache_attr[attribute].pop(value, None) + # XXX: pyjamas hack: we need to use pop instead of del + try: + cache_attr[attribute].pop(value) + except KeyError: + pass else: cache_attr[attribute] = value