mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-07 11:13:10 +00:00
For module parameter checking, allow conversion of int to float (#17325)
Fixes https://github.com/ansible/ansible-modules-core/issues/4084
This commit is contained in:
@@ -1505,7 +1505,7 @@ class AnsibleModule(object):
|
||||
if isinstance(value, float):
|
||||
return value
|
||||
|
||||
if isinstance(value, string_types):
|
||||
if isinstance(value, (binary_type, text_type, int)):
|
||||
return float(value)
|
||||
|
||||
raise TypeError('%s cannot be converted to a float' % type(value))
|
||||
|
||||
Reference in New Issue
Block a user