slight changes to error handling to align with v1

This commit is contained in:
Brian Coca 2015-05-13 11:15:04 -04:00
commit b85ce38834
2 changed files with 15 additions and 5 deletions

View file

@ -105,7 +105,7 @@ class AdHocCLI(CLI):
return 0
if self.options.module_name in C.MODULE_REQUIRE_ARGS and not self.options.module_args:
raise AnsibleError("No argument passed to %s module" % self.options.module_name)
raise AnsibleOptionsError("No argument passed to %s module" % self.options.module_name)
#TODO: implement async support
#if self.options.seconds: