mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Py3 compatibility fixes
This commit is contained in:
parent
56840f9a08
commit
a75470a913
1 changed files with 3 additions and 7 deletions
|
@ -40,10 +40,11 @@ import salt.runner
|
|||
|
||||
# Import 3rd party libs
|
||||
import jinja2
|
||||
from salt.ext.six.moves import builtins # pylint: disable=import-error
|
||||
|
||||
|
||||
# pylint: disable=W0611
|
||||
# These are imported to be available in the spawmed shell
|
||||
# These are imported to be available in the spawned shell
|
||||
|
||||
|
||||
import yaml
|
||||
|
@ -115,12 +116,7 @@ def main():
|
|||
Use Salt's outputters to print values to the shell
|
||||
'''
|
||||
if value is not None:
|
||||
try:
|
||||
import __builtin__
|
||||
__builtin__._ = value
|
||||
except ImportError:
|
||||
__builtins__._ = value
|
||||
|
||||
builtins._ = value
|
||||
salt.output.display_output(value, '', salt_vars['__opts__'])
|
||||
|
||||
sys.displayhook = salt_outputter
|
||||
|
|
Loading…
Add table
Reference in a new issue