Skip to content

Fail fast with invalid arguments #13

Description

@jarcec

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions