mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix TypeError: argument of type int is not iterable
This commit is contained in:
parent
4859e6c9f0
commit
070ae845de
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ class Batch(object):
|
|||
'''
|
||||
partition = lambda x: float(x) / 100.0 * len(self.minions)
|
||||
try:
|
||||
if '%' in self.opts['batch']:
|
||||
if isinstance(self.opts['batch'], str) and '%' in self.opts['batch']:
|
||||
res = partition(float(self.opts['batch'].strip('%')))
|
||||
if res < 1:
|
||||
return int(math.ceil(res))
|
||||
|
|
Loading…
Add table
Reference in a new issue