1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

feedback on ad hoc prohibited vars error msg

This commit is contained in:
AlanCoding 2017-10-06 14:07:38 -04:00
parent 721674f0cd
commit edda5e5420
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B
2 changed files with 4 additions and 4 deletions

View File

@ -2763,8 +2763,8 @@ class AdHocCommandSerializer(UnifiedJobSerializer):
redacted_extra_vars, removed_vars = extract_ansible_vars(value)
if removed_vars:
raise serializers.ValidationError(_(
"Variables {} are prohibited from use in ad hoc commands."
).format(",".join(removed_vars)))
"{} are prohibited from use in ad hoc commands."
).format(", ".join(removed_vars)))
return vars_validate_or_raise(value)

View File

@ -2142,8 +2142,8 @@ class RunAdHocCommand(BaseTask):
redacted_extra_vars, removed_vars = extract_ansible_vars(ad_hoc_command.extra_vars_dict)
if removed_vars:
raise ValueError(_(
"unable to use {} variables with ad hoc commands"
).format(",".format(removed_vars)))
"{} are prohibited from use in ad hoc commands."
).format(", ".join(removed_vars)))
args.extend(['-e', json.dumps(ad_hoc_command.extra_vars_dict)])