Bug 20200 - rhn_check error handling empty actions
Summary: rhn_check error handling empty actions
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: up2date
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-02 11:19 UTC by Harald Hoyer
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-28 20:04:42 UTC
Embargoed:


Attachments (Terms of Use)

Description Harald Hoyer 2000-11-02 11:19:52 UTC
action should always be a dictionary, as checked in check_action:
    if type(action) != type({}):
        if argVerbose > 1:
            print "Got unparseable response:"
            print action
        print "if type(action) != type({})"
        sys.exit(-1)
but in the main loop a check against an empty string is made, so rhn_check
returns -1 instead of 0.

--- /usr/sbin/rhn_check.old     Thu Nov  2 12:21:48 2000
+++ /usr/sbin/rhn_check Thu Nov  2 12:21:05 2000
@@ -411,7 +410,7 @@
         listed in the %s file or that the
         RHNS-CA-CERT file is invalid.""" % rhns_ca_cert
         sys.exit(-1)
-    if action == "": 
+    if action == {}: 
         break
     check_action(action)   
     handle_action(action)

Comment 1 Cristian Gafton 2001-02-02 01:56:41 UTC
The check in the main loop is done before calling check_action. for compatbility
reasons the correct check in the main loop will be
	if action in ["", {}]
		break

Fixed in CVS.


Note You need to log in before you can comment on or make changes to this bug.