From 2665ad4ca69ff8c66b1b06c889a1887c0fd33ad0 Mon Sep 17 00:00:00 2001 From: twangboy Date: Wed, 25 Mar 2015 10:39:37 -0600 Subject: [PATCH] Used WMI to detect real osversion in Windows --- salt/grains/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/grains/core.py b/salt/grains/core.py index 87a2fab304..28eb08ef7f 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -893,8 +893,9 @@ def os_data(): # pylint: enable=unpacking-non-sequence if salt.utils.is_windows(): + wmi_c = wmi.WMI() grains['osrelease'] = grains['kernelrelease'] - grains['osversion'] = grains['kernelrelease'] = version + grains['osversion'] = grains['kernelrelease'] = wmi_c.Win32_OperatingSystem()[0].Version grains['os'] = 'Windows' grains['os_family'] = 'Windows' grains.update(_memdata(grains))