Hi,

during some tests of the master branch I realized some issues with rhn-custom-
info. It seems that some reorganization of the code introduced some bugs in 
this package.

I have created a patch which is attached.

-- 
Regards,

        Michael Calmer

--------------------------------------------------------------------------
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--------------------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From c8c5bd99efdd0188464b1d9de2fd9f8ba6d6331a Mon Sep 17 00:00:00 2001
From: Michael Calmer <m...@suse.de>
Date: Thu, 7 Apr 2011 12:00:52 +0200
Subject: [PATCH] fix rhn-custom-info

- getServerURL() return now an array. Use the first value
- sslCACert is now from type unicode and not string
- initUp2dateConfig is in module config
---
 client/tools/rhncustominfo/rhn-custom-info.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/tools/rhncustominfo/rhn-custom-info.py b/client/tools/rhncustominfo/rhn-custom-info.py
index 7f886ed..73d91e9 100755
--- a/client/tools/rhncustominfo/rhn-custom-info.py
+++ b/client/tools/rhncustominfo/rhn-custom-info.py
@@ -32,7 +32,7 @@ from up2date_client import up2dateAuth
 
 def create_server_obj(server_url):
 
-    cfg = initUp2dateConfig()
+    cfg = config.initUp2dateConfig()
     
     enable_proxy = cfg['enableProxy']
     proxy_host = None
@@ -48,7 +48,7 @@ def create_server_obj(server_url):
                                                                                        
     ca = cfg['sslCACert']
         
-    if type(ca) == type(""):
+    if isinstance(ca, str) or isinstance(ca, unicode):
         ca = [ca]
  
     ca_certs = ca or ["/usr/share/rhn/RHNS-CA-CERT"]
@@ -184,7 +184,7 @@ def main():
     if options.url:
         url = options.url
     else:
-        url = munge_server_url(config.getServerlURL())
+        url = munge_server_url(config.getServerlURL()[0])
 
     s = create_server_obj(url)
     
-- 
1.7.3.4

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to