Message7693
I've recently moved a production tracker from python2 to python3.
Now I'm getting *occasionally* a Traceback
TypeError: '<' not supported between instances of 'function' and 'function'
when sorting detectors (auditors and reactors).
These are using a PrioList object which sorts on demand before iterating over auditors and/or reactors.
The idea there is that detectors can have a priority.
The objects in the list are 3-tuples with prio, name, function.
This should never try to look at the function unless we have two entries with the same prio (the default is 100 and this is seldomly set explicitly so they may all be the same) and name.
Since this is quite urgent for me I'll try to fix this by allowing a key function to be passed to the PrioList. This would then be something like "lambda x: x[:2]" so that we never compare function objects. This is probably the right thing to do.
What I find very confusing is that this should happen everytime when sorting the detectors. It doesn't. |
|
Date |
User |
Action |
Args |
2022-12-21 18:36:05 | schlatterbeck | set | recipients:
+ schlatterbeck, rouilj |
2022-12-21 18:36:05 | schlatterbeck | set | messageid: <1671647765.44.0.499935488614.issue2551250@roundup.psfhosted.org> |
2022-12-21 18:36:05 | schlatterbeck | link | issue2551250 messages |
2022-12-21 18:36:05 | schlatterbeck | create | |
|