Skip to content

Properly raising exceptions

Hugo Haas requested to merge fix-exceptions into master

Avoiding errors such as:

Traceback (most recent call last):
  File ".\scripts\gpm-playlistgen.py", line 38, in <module>
    gpmplgen.retrieve_library()
  File "c:\users\hugoh\code\gpm-playlistgen\gpmplgen\gpmplgen.py", line 115, in retrieve_library
    self.store_playlists_in_db(get_songs)
  File "c:\users\hugoh\code\gpm-playlistgen\gpmplgen\gpmplgen.py", line 96, in store_playlists_in_db
    tracks = self._get_all_playlists_songs(other_playlists)
  File "c:\users\hugoh\code\gpm-playlistgen\gpmplgen\gpmplgen.py", line 69, in _get_all_playlists_songs          for p in playlists_with_contents:
UnboundLocalError: local variable 'playlists_with_contents' referenced before assignment

Merge request reports

Loading