Update old utils paths to new utils paths

This commit is contained in:
rallytime 2018-03-27 16:45:16 -04:00
parent e312efb5e7
commit d0278345fc
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
3 changed files with 4 additions and 4 deletions

View file

@ -373,7 +373,7 @@ def render_jinja_tmpl(tmplstr, context, tmplpath=None):
continue
try:
decoded_context[key] = salt.utils.to_unicode(value, encoding=SLS_ENCODING)
decoded_context[key] = salt.utils.stringutils.to_unicode(value, encoding=SLS_ENCODING)
except UnicodeDecodeError as ex:
log.debug(
"Failed to decode using default encoding (%s), trying system encoding",

View file

@ -23,7 +23,7 @@ from salt.ext import six
@destructiveTest
@skipIf(salt.utils.is_windows(), 'minion is windows')
@skipIf(salt.utils.platform.is_windows(), 'minion is windows')
class PkgrepoTest(ModuleCase, SaltReturnAssertsMixin):
'''
pkgrepo state tests

View file

@ -86,7 +86,7 @@ class LocalCacheCleanOldJobsTestCase(TestCase, LoaderModuleMockMixin):
# Sleep on Windows because time.time is only precise to 3 decimal
# points, and therefore subtracting the jid_ctime from time.time
# will result in a negative number
if salt.utils.is_windows():
if salt.utils.platform.is_windows():
time.sleep(0.25)
local_cache.clean_old_jobs()
@ -158,7 +158,7 @@ class LocalCacheCleanOldJobsTestCase(TestCase, LoaderModuleMockMixin):
# Sleep on Windows because time.time is only precise to 3 decimal
# points, and therefore subtracting the jid_ctime from time.time
# will result in a negative number
if salt.utils.is_windows():
if salt.utils.platform.is_windows():
time.sleep(0.25)
local_cache.clean_old_jobs()