From a75470a913ea635efce6ef8f8f82255fbbf56307 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 22 Nov 2014 10:44:46 +0000 Subject: [PATCH] Py3 compatibility fixes --- tests/saltsh.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/saltsh.py b/tests/saltsh.py index aa2cfb249c9..4167cebc924 100644 --- a/tests/saltsh.py +++ b/tests/saltsh.py @@ -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