Mercurial > libervia-pubsub
comparison sat_pubsub/pgsql_storage.py @ 366:81e6d4a516c3
storage (pgsql): getDefaultConfiguration now returns a shallow copy of default conf dict, to avoid modification.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 04 Nov 2017 21:17:12 +0100 |
parents | 9fbb31ce495b |
children | a772f7dac930 |
comparison
equal
deleted
inserted
replaced
365:9fbb31ce495b | 366:81e6d4a516c3 |
---|---|
385 d = self.dbpool.runQuery(*withPEP(' '.join(query), args, pep, recipient)) | 385 d = self.dbpool.runQuery(*withPEP(' '.join(query), args, pep, recipient)) |
386 d.addCallback(toSubscriptions) | 386 d.addCallback(toSubscriptions) |
387 return d | 387 return d |
388 | 388 |
389 def getDefaultConfiguration(self, nodeType): | 389 def getDefaultConfiguration(self, nodeType): |
390 return self.defaultConfig[nodeType] | 390 return self.defaultConfig[nodeType].copy() |
391 | 391 |
392 def formatLastItems(self, result): | 392 def formatLastItems(self, result): |
393 last_items = [] | 393 last_items = [] |
394 for pep_jid_s, node, data, item_access_model in result: | 394 for pep_jid_s, node, data, item_access_model in result: |
395 pep_jid = jid.JID(pep_jid_s) | 395 pep_jid = jid.JID(pep_jid_s) |