Merge pull request #7765 from samdolan/devel
Raise exception if "file_name" isn't passed to bin/ansible-vaultpull/4420/head
commit
053019c439
|
@ -112,7 +112,6 @@ def _read_password(filename):
|
|||
return data
|
||||
|
||||
def execute_create(args, options, parser):
|
||||
|
||||
if len(args) > 1:
|
||||
raise errors.AnsibleError("'create' does not accept more than one filename")
|
||||
|
||||
|
@ -204,6 +203,11 @@ def main():
|
|||
parser = build_option_parser(action)
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if not len(args):
|
||||
raise errors.AnsibleError(
|
||||
"The '%s' command requires a filename as the first argument" % action
|
||||
)
|
||||
|
||||
# execute the desired action
|
||||
try:
|
||||
fn = globals()["execute_%s" % action]
|
||||
|
|
Loading…
Reference in New Issue