For module parameter checking, allow conversion of int to float (#17325)

Fixes https://github.com/ansible/ansible-modules-core/issues/4084
pull/17417/head
Toshio Kuratomi 8 years ago
parent da3fd2d588
commit e8dddc3679

@ -1483,7 +1483,7 @@ class AnsibleModule(object):
if isinstance(value, float):
return value
if isinstance(value, basestring):
if isinstance(value, (binary_type, text_type, int)):
return float(value)
raise TypeError('%s cannot be converted to a float' % type(value))

Loading…
Cancel
Save