ansible/utils/: PEP8 compliancy (#24686)

- Make PEP8 compliant
This commit is contained in:
Dag Wieers 2017-05-30 19:09:44 +02:00 committed by John R Barker
parent d5ad3093d6
commit 51b595992b
11 changed files with 75 additions and 78 deletions

View file

@ -28,8 +28,7 @@ def pct_to_int(value, num_items, min_value=1):
otherwise converts the given value to an integer.
'''
if isinstance(value, string_types) and value.endswith('%'):
value_pct = int(value.replace("%",""))
return int((value_pct/100.0) * num_items) or min_value
value_pct = int(value.replace("%", ""))
return int((value_pct / 100.0) * num_items) or min_value
else:
return int(value)