← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~ldeks/openlp/ldeks-bugfix into lp:openlp

 

Review: Needs Fixing

Rather than wrapping the code in a try...except, change the elif to:

  elif hasattr(song, 'book') and song.book:

This will check if the attribute exists before trying to work with it, and is more efficient since you're not invoking the try and dealing with the odd exception.

Also don't forget to backport the fix to 2.4 once this one is done.
-- 
https://code.launchpad.net/~ldeks/openlp/ldeks-bugfix/+merge/312962
Your team OpenLP Core is subscribed to branch lp:openlp.


References