maxbambi / plugin.video.raitv

Kodi plugin for RAI
GNU General Public License v3.0
35 stars 9 forks source link

Give "thumb" variable a default value. #55

Closed madpilot78 closed 2 years ago

madpilot78 commented 2 years ago

Prevents errors like the following:

2022-07-18 20:25:48.633 T:1272050560   DEBUG: Raiplay: get Rai channels:
2022-07-18 20:25:48.784 T:1272050560   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnboundLocalError'>
                                            Error Contents: local variable 'thumb' referenced before assignment
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.raitv/default.py", line 771, in <module>
                                                show_tv_channels()
                                              File "/storage/.kodi/addons/plugin.video.raitv/default.py", line 218, in show_tv_channels
                                                if thumb:
                                            UnboundLocalError: local variable 'thumb' referenced before assignment
                                            -->End of Python script error report<--