Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

{Pairing, Authentication}Status.__getattr__ raises KeyError instead of AttributeError #32

@trdarr

Description

@trdarr

We use __getattr__ to make accessing the response data nicer, so __getattr__(self, name) returns self._raw_data[name]. However, if name isn’t in _raw_data, a KeyError will be raised. I think most Python programmers would expect an AttributeError. We should probably also support nested attributes, because auth_request.requester.id is way less pretty than auth_request.requester['id'].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions