Roundup Tracker - Issues


Author schlatterbeck
Recipients rouilj, schlatterbeck
Date 2022-12-21.18:36:05
Message-id <>
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:05schlatterbecksetrecipients: + schlatterbeck, rouilj
2022-12-21 18:36:05schlatterbecksetmessageid: <>
2022-12-21 18:36:05schlatterbecklinkissue2551250 messages
2022-12-21 18:36:05schlatterbeckcreate