Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix :: searchForNeededEpisodes : Fixed NoneType AttributeError exception. #642

Merged

Conversation

Conjuro
Copy link
Contributor

@Conjuro Conjuro commented Mar 30, 2013

Don't store None value bestResult (occurs when all results are rejected) in foundResults list. Quality comparisons with results from other providers throws an exception and prevents completion of the search.

I believe that findSeason() may suffer from the same problem (NoneType in return list), though that was on @tolstyak's branch I discovered it. At the time I just threw a rough fix on it (Conjuro/Sick-Beard@19770dd), but it would probably be better to find the root cause. findSeason() is somewhat larger to muddle through and right now I'm hungry, tired and got a headache, so I'll have to get back to it later, unless someone else wants to give it a whack.

@Conjuro
Copy link
Contributor Author

Conjuro commented Jun 7, 2013

Rebased for current development branch. Been using for 2 months without issue.

Haven't gotten around to checking findSeason() yet.

@@ -180,6 +180,11 @@ def searchForNeededEpisodes():

bestResult = pickBestResult(curFoundResults[curEp])

# if all results were rejected move on to the next episode
if not bestResult:
logger.log(u"All found results for %s were rejected." % curEp.prettyName(), logger.DEBUG)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe edit this line to 'match' the rest?

logger.log(u"All found results for " + curEp.prettyName() + " were rejected.", logger.DEBUG)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this addition. @Conjuro can you update so we can pull?

…eption.

Don't store None value bestResult (occurs when all results are rejected) in foundResults list. Quality comparisons with results from other providers throws an exception.
@Conjuro
Copy link
Contributor Author

Conjuro commented Jun 19, 2013

Just got back from a week long out of town trip.

As suggested by @itofzo, I've updated patch to use same style logging as rest of file.

midgetspy added a commit that referenced this pull request Jul 9, 2013
Bugfix :: searchForNeededEpisodes : Fixed NoneType AttributeError exception.
@midgetspy midgetspy merged commit b2e7aeb into midgetspy:development Jul 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants