Py3 compatibility fixes

This commit is contained in:
Pedro Algarvio 2014-11-22 11:36:37 +00:00
parent a8ff8fa0b5
commit 85b66a47c5

View File

@ -24,6 +24,9 @@ ensure_in_syspath('../../')
# Import salt libs
from salt.utils import path_join
# Import 3rd-party libs
import salt.ext.six as six
class PathJoinTestCase(TestCase):
@ -102,7 +105,7 @@ class PathJoinTestCase(TestCase):
code = """'''Salt unittest loaded NT module'''"""
module = imp.new_module('nt')
exec code in module.__dict__
six.exec_(code, module.__dict__)
sys.modules['nt'] = module
sys.builtin_module_names = modules