mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix salt/cli/batch.py TypeError: argument of type int is not iterable
This commit is contained in:
parent
070ae845de
commit
211915ca90
1 changed files with 2 additions and 1 deletions
|
@ -85,7 +85,8 @@ class Batch(object):
|
|||
'''
|
||||
partition = lambda x: float(x) / 100.0 * len(self.minions)
|
||||
try:
|
||||
if isinstance(self.opts['batch'], str) and '%' in self.opts['batch']:
|
||||
if (isinstance(self.opts['batch'], str) or isinstance(self.opts['batch'], unicode)) \
|
||||
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