mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Py3 compatibility fixes
This commit is contained in:
parent
c0dd5564a5
commit
fe454d4132
1 changed files with 5 additions and 2 deletions
|
@ -17,6 +17,9 @@ import os
|
|||
# Import Salt libs
|
||||
import salt.utils.event
|
||||
|
||||
# Import 3rd-party libs
|
||||
import salt.ext.six as six
|
||||
|
||||
|
||||
def parse():
|
||||
'''
|
||||
|
@ -47,7 +50,7 @@ def parse():
|
|||
|
||||
opts = {}
|
||||
|
||||
for k, v in options.__dict__.items():
|
||||
for k, v in six.iteritems(options.__dict__):
|
||||
if v is not None:
|
||||
opts[k] = v
|
||||
|
||||
|
@ -97,7 +100,7 @@ def listen(opts):
|
|||
if opts['func_count']:
|
||||
data = ret.get('data', False)
|
||||
if data:
|
||||
if 'id' in data.keys() and data.get('id', False) not in found_minions:
|
||||
if 'id' in six.iterkeys(data) and data.get('id', False) not in found_minions:
|
||||
if data['fun'] == opts['func_count']:
|
||||
jid_counter += 1
|
||||
found_minions.append(data['id'])
|
||||
|
|
Loading…
Add table
Reference in a new issue