[node-patches] Change in ovirt-node[master]: rhn: report and log stdout if wget fails

jboggs at redhat.com jboggs at redhat.com
Thu Nov 1 16:11:20 UTC 2012


Joey Boggs has uploaded a new change for review.

Change subject: rhn: report and log stdout if wget fails
......................................................................

rhn: report and log stdout if wget fails

rhbz#870938

Change-Id: I387b3bc291f2c654c411a80f877980a1852f78c7
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M scripts/rhn.py
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/78/8978/1

diff --git a/scripts/rhn.py b/scripts/rhn.py
index 055ccff..5ce0add 100755
--- a/scripts/rhn.py
+++ b/scripts/rhn.py
@@ -49,9 +49,14 @@
             logger.debug("Location: " + location)
             logger.info("Downloading Satellite CA cert.....")
             logger.debug("From: " + cacert + " To: " + location)
-            system_closefds("wget -q -nd --no-check-certificate " +
-                            "--timeout=30 --tries=3 -O \"" + location +
-                            "\" \"" + cacert + "\"")
+            wget_cmd = "wget -nd --no-check-certificate " + \
+                            "--timeout=30 --tries=3 -O \"" + location + \
+                            "\" \"" + cacert + "\""
+            wget_proc = passthrough(wget_cmd, logger.debug)
+            if wget_proc.retval > 0:
+                logger.error("Error Downloading Satellite CA cert!")
+                logger.debug(wget_proc.stdout)
+                return 3
         if os.path.isfile(location):
             if os.stat(location).st_size > 0:
                 args.append('--sslCACert')


--
To view, visit http://gerrit.ovirt.org/8978
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I387b3bc291f2c654c411a80f877980a1852f78c7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>



More information about the node-patches mailing list