<DKIM> [BUG] function argument set to an object
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Mon Dec 19 12:15:24 GMT 2016
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
On Mon, Dec 19, 2016 at 11:59 AM, Nicolas Sebrecht
<nicolas.s-dev at laposte.net> wrote:
> On Mon, Dec 19, 2016 at 07:06:17AM +0000, Luke Kenneth Casson Leighton wrote:
>> aiyaaa! mustn't do this! it's the "pattern" for a singleton:
>>
>> LocalStatusSQLite.py (and probably LocalStatus.py as well):
>> def savemessage(self, uid, content, flags, rtime, mtime=0, labels=set()):
> Looks correct analisys to me. I didn't check how this issue impacts the
> code, though.
the assignment into the self.messagelist[uid]['labels'] is basically
pointing to the exact same set in every single self.messagelist[uid],
which is baad. howeverrr.... in e.g. the gmail folder,
savemessagelabels gets called afterwards and updates it (overwrites
the 'labels' key in the dict). so in that (one) instance it's okay.
l.
More information about the OfflineIMAP-project
mailing list