mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use six.integer_types instead of int
This catches longs on PY2.
This commit is contained in:
parent
cf21f91fb2
commit
d533877743
1 changed files with 2 additions and 2 deletions
|
@ -1963,7 +1963,7 @@ def is_true(value=None):
|
|||
pass
|
||||
|
||||
# Now check for truthiness
|
||||
if isinstance(value, (int, float)):
|
||||
if isinstance(value, (six.integer_types, float)):
|
||||
return value > 0
|
||||
elif isinstance(value, six.string_types):
|
||||
return str(value).lower() == 'true'
|
||||
|
@ -2735,7 +2735,7 @@ def repack_dictlist(data,
|
|||
if val_cb is None:
|
||||
val_cb = lambda x, y: y
|
||||
|
||||
valid_non_dict = (six.string_types, int, float)
|
||||
valid_non_dict = (six.string_types, six.integer_types, float)
|
||||
if isinstance(data, list):
|
||||
for element in data:
|
||||
if isinstance(element, valid_non_dict):
|
||||
|
|
Loading…
Add table
Reference in a new issue