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

Add user-friendly error message to generatekeys.py #44

Open
aaaaalbert opened this issue Aug 11, 2014 · 0 comments
Open

Add user-friendly error message to generatekeys.py #44

aaaaalbert opened this issue Aug 11, 2014 · 0 comments
Labels

Comments

@aaaaalbert
Copy link
Contributor

While generatekeys.py isn't the most-often used script in our repos, it should nevertheless print meaningful information when called with wrong or too little arguments. Let usage() functions in other code inspire you.

albert$ python generatekeys.py 
Traceback (most recent call last):
  File "generatekeys.py", line 14, in <module>
    pubfn = sys.argv[1]+'.publickey'
IndexError: list index out of range
albert$ python generatekeys.py keyname abcdef
Traceback (most recent call last):
  File "generatekeys.py", line 18, in <module>
    keylength = int(sys.argv[2])
ValueError: invalid literal for int() with base 10: 'abcdef'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant