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

Fail fast with invalid arguments #13

Open
jarcec opened this issue Jan 19, 2018 · 1 comment
Open

Fail fast with invalid arguments #13

jarcec opened this issue Jan 19, 2018 · 1 comment

Comments

@jarcec
Copy link
Contributor

jarcec commented Jan 19, 2018

In one of my runs I've specified both --include-services and --exclude-services which eventually ended up with:

Traceback (most recent call last):
  File "/usr/local/bin/clusterdock", line 9, in <module>
    load_entry_point('clusterdock==1.3.2', 'console_scripts', 'clusterdock')()
  File "/usr/local/lib/python3.5/dist-packages/clusterdock/cli.py", line 175, in main
    action.main(args)
  File "/home/ubuntu/topology_cdh/start.py", line 268, in main
    raise ValueError('Cannot pass both --include-services and --exclude-services.')
ValueError: Cannot pass both --include-services and --exclude-services.

I was somehow expecting that it will fail but wanted to try it anyway. The interesting bit is that the code run for 6 minutes. What about validating the arguments at the begging of execution to give the user immediate feedback?

@dimaspivak
Copy link
Member

Patches welcome! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants