Skip to content

Errors being logged to stdout instead of via logging library makes it not easy to debug them #9

@ShadowJonathan

Description

@ShadowJonathan

I encountered this while looking at MiguelAngelLV/ha-nintendo-switch#10; the following lines do a print and then return None;

nso-api/nso_api/imink.py

Lines 40 to 42 in a89eb68

if res.status_code != 200:
print(f'Unexpected HTTP code "{res.status_code} {res.reason}" from imink f')
return None

nso-api/nso_api/imink.py

Lines 58 to 60 in a89eb68

if res.status_code != 200:
print(f'Unexpected HTTP code "{res.status_code} {res.reason}" from imink config')
return None

These should be using logging or the likes, with an error or a warning, since then it can bubble up to other applications, such as home assistant.

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