mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Python 2: accept both long and int for type=int (module options) (#53289)
* Added unit test
This commit is contained in:
parent
1112e1d0da
commit
07fcb60d55
3 changed files with 13 additions and 5 deletions
|
@ -1864,7 +1864,7 @@ class AnsibleModule(object):
|
|||
raise TypeError('%s cannot be converted to a bool' % type(value))
|
||||
|
||||
def _check_type_int(self, value):
|
||||
if isinstance(value, int):
|
||||
if isinstance(value, integer_types):
|
||||
return value
|
||||
|
||||
if isinstance(value, string_types):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue