Add check for processor_core value

Fixes #21893

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-05-10 10:49:41 +05:30 committed by Brian Coca
parent d834412ead
commit 8ad182059d

View file

@ -1204,7 +1204,7 @@ class LinuxHardware(Hardware):
self.facts['processor_count'] = i self.facts['processor_count'] = i
socket_values = list(sockets.values()) socket_values = list(sockets.values())
if socket_values: if socket_values and socket_values[0]:
self.facts['processor_cores'] = socket_values[0] self.facts['processor_cores'] = socket_values[0]
else: else:
self.facts['processor_cores'] = 1 self.facts['processor_cores'] = 1