lyft / python-blessclient

Python client for fetching BLESS certificates
Apache License 2.0
114 stars 39 forks source link

Use expanduser to more reliably get homedir #41

Closed asottile closed 6 years ago

asottile commented 6 years ago

When the current working directory was missing this was crashing with:

Traceback (most recent call last):
  File "/home/asottile/workspace/blessclient/bless", line 11, in <module>
    load_entry_point('blessclient', 'console_scripts', 'blessclient')()
  File "/home/asottile/workspace/blessclient/python-blessclient/blessclient/client.py", line 864, in main
    bless(region, args.nocache, args.gui, args.host, bless_config)
  File "/home/asottile/workspace/blessclient/python-blessclient/blessclient/client.py", line 648, in bless
    bless_cache = get_bless_cache(nocache, bless_config)
  File "/home/asottile/workspace/blessclient/python-blessclient/blessclient/client.py", line 284, in get_bless_cache
    os.getenv('HOME', os.getcwd()),
FileNotFoundError: [Errno 2] No such file or directory
skiptomyliu commented 6 years ago

👍