You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The current behavior matches the behavior in the netrc module in the stdlib as of Python 3.6.
It looks like the behavior was changed for 3.7 by python/cpython#4537 . Now, an error is not raised if $HOME isn't set. I'll go ahead and update tinynetrc to match the new behavior.
Keep in mind that an error will still be raised if the netrc file is not found, so you'll need to handle FileNotFoundError accordingly.
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.
https://travis-ci.org/siteship/siteship-cli
The text was updated successfully, but these errors were encountered: