File 0001-machine_info-capability-and-check-for-client-tool-co.patch of Package spacewalk-client-tools.2642

From 1eba26a57c7ba8fd207aceecd95683c137728cdc Mon Sep 17 00:00:00 2001
From: Matei Albu <malbu@suse.de>
Date: Tue, 14 Jun 2016 13:03:21 +0200
Subject: [PATCH] machine_info capability and check for client tool
 compatibility with Suma 2.1

---
 client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index 4d6dcc7..7557943 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -854,6 +854,9 @@ def get_sysinfo():
 
 
 def read_machineinfo():
+    s = rhnserver.RhnServer()
+    if not s.capabilities.hasCapability('machine_info'):
+        return
     machineinfo = {}
     machineinfo["class"] = "MACHINEINFO"
     machine_id = getMachineId()
-- 
2.8.3

openSUSE Build Service is sponsored by