mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Py3 compatibility fixes.
This commit is contained in:
parent
7c81f6df70
commit
cb4aa40516
@ -45,12 +45,16 @@ If you want to run reclass from source, rather than installing it, you can
|
||||
either let the master know via the ``PYTHONPATH`` environment variable, or by
|
||||
setting the configuration option, like in the example above.
|
||||
'''
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
# This file cannot be called reclass.py, because then the module import would
|
||||
# not work. Thanks to the __virtual__ function, however, the plugin still
|
||||
# responds to the name 'reclass'.
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import salt libs
|
||||
from salt.exceptions import SaltInvocationError
|
||||
from salt.utils.reclass import (
|
||||
prepend_reclass_source_path,
|
||||
@ -58,6 +62,9 @@ from salt.utils.reclass import (
|
||||
set_inventory_base_uri_default
|
||||
)
|
||||
|
||||
# Import 3rd-party libs
|
||||
import salt.ext.six as six
|
||||
|
||||
# Define the module's virtual name
|
||||
__virtualname__ = 'reclass'
|
||||
|
||||
@ -76,7 +83,7 @@ def __virtual__(retry=False):
|
||||
continue
|
||||
|
||||
# each pillar entry is a single-key hash of name -> options
|
||||
opts = next(pillar.itervalues())
|
||||
opts = next(six.itervalues(pillar))
|
||||
prepend_reclass_source_path(opts)
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user