Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0060.py @ 1512:fcfec24c87f3
plugin XEP-0060: fixes a one-line loop
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 10 Sep 2015 07:37:14 +0200 |
parents | 0f0889028eea |
children | e0bde0d0b321 |
comparison
equal
deleted
inserted
replaced
1511:83f71763e1a7 | 1512:fcfec24c87f3 |
---|---|
253 | 253 |
254 def addMetadata(items): | 254 def addMetadata(items): |
255 metadata = {} | 255 metadata = {} |
256 if rsm_request is not None: | 256 if rsm_request is not None: |
257 rsm_data = client.pubsub_client.getRSMResponse(ext_data['id']) | 257 rsm_data = client.pubsub_client.getRSMResponse(ext_data['id']) |
258 metadata.update({'rsm_{}'.format(key): value for key, value in rsm_data}) | 258 metadata.update({'rsm_{}'.format(key): value for key, value in rsm_data.iteritems()}) |
259 return (items, metadata) | 259 return (items, metadata) |
260 | 260 |
261 d.addCallback(addMetadata) | 261 d.addCallback(addMetadata) |
262 return d | 262 return d |
263 | 263 |