Fix backport of grains fix

A fix recently made to the salt/grains/disks.py was backported to
2017.7, but the fopen function was moved in oxygen and so the function
does not exist in 2017.7.

This did not make it into 2017.7.3 so there is no need to add this fix
to any hotfixes.
This commit is contained in:
Erik Johnson 2018-02-07 13:59:01 -06:00
parent 43a45b42c3
commit 6cf7e50cc4
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -128,7 +128,7 @@ def _linux_disks():
for entry in glob.glob('/sys/block/*/queue/rotational'):
try:
with salt.utils.files.fopen(entry) as entry_fp:
with salt.utils.fopen(entry) as entry_fp:
device = entry.split('/')[3]
flag = entry_fp.read(1)
if flag == '0':