Skip to content

Fail silently #2

Closed
Closed
@madisvain

Description

@madisvain

Currently if I use Travis for testing then using this library makes tests fail as it does not gracfully fail if it does not find the .netrc file.

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_siteship.py ____________________
.tox/py36/lib/python3.6/site-packages/tinynetrc.py:38: in __init__
    file = os.path.join(os.environ['HOME'], ".netrc")
.tox/py36/lib/python3.6/os.py:669: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'HOME'
During handling of the above exception, another exception occurred:
tests/test_siteship.py:11: in <module>
    from siteship import cli
siteship/cli.py:14: in <module>
    netrc = Netrc()
.tox/py36/lib/python3.6/site-packages/tinynetrc.py:40: in __init__
    raise OSError("Could not find .netrc: $HOME is not set")
E   OSError: Could not find .netrc: $HOME is not set

https://travis-ci.org/siteship/siteship-cli

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