Skip to content

Crashes when supplied entity not a Tent entity #44

@graue

Description

@graue

_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions