Merge lp:~rockstar/entertainer/0.4-bugfixes into lp:entertainer

Proposed by Paul Hummer
Status: Merged
Approved by: Matt Layman
Approved revision: 355
Merged at revision: not available
Proposed branch: lp:~rockstar/entertainer/0.4-bugfixes
Merge into: lp:entertainer
Diff against target: None lines
To merge this branch: bzr merge lp:~rockstar/entertainer/0.4-bugfixes
Reviewer Review Type Date Requested Status
Samuel Buffet (community) Approve
Matt Layman Approve
Review via email: mp+4755@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) wrote :

This branch is probably the final one to be landed before 0.4. This covers
two bugs that I looked through and thought it would be beneficial to fix
before 0.4. I'm hoping to release 0.4 tomorrow, so a quick review would be
helpful.

--
Paul Hummer
http://theironlion.net
1024/862FF08F C921 E962 58F8 5547 6723 0E8C 1C4D 8AC5 862F F08F

Revision history for this message
Matt Layman (mblayman) wrote :

These fixes look good to me.

Like my media player branch, this branch is missing regression tests. I guess we need to figure out a policy on what branches can be submitted without the tests that prove that do what they were set out to do.

review: Approve
Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

Hi Paul,

Okay with this branch. To be honest I've done my usual tests, I only look the diff.

Samuel,

review: Approve
Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

... I've not done ...

Revision history for this message
Matt Layman (mblayman) wrote :

Commit Message: Some minor bug fixes involving IndexErrors have been fixed. (Paul Hummer)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'entertainerlib/utils/albumart_downloader.py'
2--- entertainerlib/utils/albumart_downloader.py 2009-02-07 21:43:35 +0000
3+++ entertainerlib/utils/albumart_downloader.py 2009-03-22 04:53:10 +0000
4@@ -289,6 +289,9 @@
5 # This code comes from Rhythmbox so we can't control the use of 'filter'
6 # pylint: disable-msg=W0141
7
8+ if not search_results:
9+ return []
10+
11 best_match = None
12
13 for result in search_results:
14
15=== modified file 'entertainerlib/utils/lyrics_downloader.py'
16--- entertainerlib/utils/lyrics_downloader.py 2009-02-07 21:43:35 +0000
17+++ entertainerlib/utils/lyrics_downloader.py 2009-03-22 04:06:48 +0000
18@@ -95,7 +95,10 @@
19 xmldoc = minidom.parseString(lyrics_xml).documentElement
20
21 # Get the lyric from the XML file
22- lyrics = xmldoc.getElementsByTagName('tx')[0].firstChild.nodeValue
23+ try:
24+ lyrics = xmldoc.getElementsByTagName('tx')[0].firstChild.nodeValue
25+ except IndexError:
26+ return ''
27
28 # Clean spaces and enters
29 lyrics = lyrics.strip().replace('\n', '')

Subscribers

People subscribed via source and target branches