mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Py3 compatibility
This commit is contained in:
parent
da7fefaea6
commit
fb9166e977
@ -17,6 +17,8 @@ opts['ioflo_realtime']
|
||||
opts['ioflo_verbose']
|
||||
opts['caller_floscript']
|
||||
'''
|
||||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
|
||||
@ -30,8 +32,9 @@ __all__ = ['core', 'worker', 'maint']
|
||||
# Import salt libs
|
||||
import salt.daemons.masterapi
|
||||
|
||||
# Import ioflo libs
|
||||
# Import 3rd-party libs
|
||||
import ioflo.app.run
|
||||
import salt.ext.six as six
|
||||
|
||||
|
||||
def explode_opts(opts):
|
||||
@ -39,9 +42,9 @@ def explode_opts(opts):
|
||||
Explode the opts into a preloads list
|
||||
'''
|
||||
preloads = [('.salt.opts', dict(value=opts))]
|
||||
#for key, val in opts.items():
|
||||
#ukey = key.replace('.', '_')
|
||||
#preloads.append(('.salt.etc.{0}'.format(ukey), dict(value=val)))
|
||||
for key, val in six.iteritems(opts):
|
||||
ukey = key.replace('.', '_')
|
||||
preloads.append(('.salt.etc.{0}'.format(ukey), dict(value=val)))
|
||||
preloads.append(('.salt.etc.id', dict(value=opts['id'])))
|
||||
return preloads
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user