RPi-Jukebox-RFID icon indicating copy to clipboard operation
RPi-Jukebox-RFID copied to clipboard

🐛 | GenericMultiTimerClass broken

Open hoelger opened this issue 8 months ago • 3 comments

Version

3.5.3

Branch

future3/main

OS

Ubuntu 22.04

Pi model

Laptop

Hardware

No response

What happened?

  1. https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/future3/main/src/jukebox/jukebox/multitimer.py#L249 self._function = self._callee(*self.class_args, iterations=self._iterations, **self.class_kwargs) Instead of modifying the function call, so that later self._function can be called, here the function is already executed. In my case the return value is None, so later the MultiTimer tries to call none, and the program dies.

  2. GenericMultiTimerClass tries to pass on the paramter iterations and MultiTimer tries to pass on parameter iteration so this clashes.

Should those two classes be interchangeable or not? I don't get the value of GenericMultiTimerClass because you can build just the same thing by simply using the MultiTimer so my cleanest suggestion is: Delete the GenericMultiTimerClass.

If you want to keep it, here's a fix that worked for me, on first shallow testing: FixGenericMultiTimerClass.patch.txt

Logs

No response

Configuration

No response

More info

No response

hoelger avatar Jun 19 '24 14:06 hoelger