mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update old utils paths to use new utils paths
This commit is contained in:
parent
a65c60d862
commit
b53c3e695a
2 changed files with 2 additions and 2 deletions
|
@ -97,7 +97,7 @@ def sha1_digest(instr):
|
|||
Generate an sha1 hash of a given string.
|
||||
'''
|
||||
if six.PY3:
|
||||
b = salt.utils.to_bytes(instr)
|
||||
b = salt.utils.stringutils.to_bytes(instr)
|
||||
return hashlib.sha1(b).hexdigest()
|
||||
return hashlib.sha1(instr).hexdigest()
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
|
|||
'''
|
||||
Normalize the line endings of a file.
|
||||
'''
|
||||
with salt.utils.fopen(path, 'rb') as fhr:
|
||||
with salt.utils.files.fopen(path, 'rb') as fhr:
|
||||
lines = fhr.read().splitlines()
|
||||
with salt.utils.atomicfile.atomic_open(path, 'wb') as fhw:
|
||||
for line in lines:
|
||||
|
|
Loading…
Add table
Reference in a new issue