Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

fix list index error when no ':' exists in api key #7

@adam-stokes

Description

@adam-stokes
  File "/usr/lib/python3/dist-packages/maasclient/__init__.py", line 130, in nodes
    res = self.get('/nodes/', dict(op='list'))
  File "/usr/lib/python3/dist-packages/maasclient/__init__.py", line 57, in get
    auth=self._oauth(),
  File "/usr/lib/python3/dist-packages/maasclient/__init__.py", line 44, in _oauth
    resource_owner_key=self.auth.token_key,
  File "/usr/lib/python3/dist-packages/maasclient/auth.py", line 60, in token_key
    return self.api_key.split(':')[1] if self.api_key else None
IndexError: list index out of range

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