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

Crashes when supplied entity not a Tent entity #44

Open
graue opened this issue Dec 6, 2012 · 0 comments
Open

Crashes when supplied entity not a Tent entity #44

graue opened this issue Dec 6, 2012 · 0 comments

Comments

@graue
Copy link

graue commented Dec 6, 2012

_discoverAPIUrls() blows up if it doesn't find any profile URLs, because there are repeated references to profileUrls[0] (the first on tentapp.py line 319), without checking if profileUrls is non-empty. I think the fix would be:

if len(profileUrls) < 1:
    raise DiscoveryFailure("No profile URLs found at {0}").format(entityUrl)

right before trying to use profileUrls[0].

It looks like there is a check for IndexError to try to account for this case, but the IndexError will never happen.

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

No branches or pull requests

1 participant