Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when config not available #21

Open
thomai opened this issue Feb 4, 2021 · 0 comments
Open

Exception when config not available #21

thomai opened this issue Feb 4, 2021 · 0 comments

Comments

@thomai
Copy link
Owner

thomai commented Feb 4, 2021

Catch exception if one of the config files is not available.


SSHKeyDistribut0r
=================
Welcome to the world of key distribution!

Traceback (most recent call last):
  File "/usr/bin/SSHKeyDistribut0r", line 11, in <module>
    load_entry_point('SSHKeyDistribut0r==0.2.3', 'console_scripts', 'SSHKeyDistribut0r')()
  File "/home/user/local/lib/python3.9/site-packages/SSHKeyDistribut0r/command_line.py", line 32, in main
    SSHKeyDistribut0r.main(args)
  File "/home/user/.local/lib/python3.9/site-packages/SSHKeyDistribut0r/key_distribut0r.py", line 68, in main
    servers = read_config(args.server)
  File "/home/user/.local/lib/python3.9/site-packages/SSHKeyDistribut0r/key_distribut0r.py", line 54, in read_config
    return yaml.load(open(config_file))
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.config/SSHKeyDistribut0r/servers.yml'```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant