Bug 20200 - rhn_check error handling empty actions
rhn_check error handling empty actions
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: up2date (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-02 06:19 EST by Harald Hoyer
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-28 15:04:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harald Hoyer 2000-11-02 06:19:52 EST
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-01 20:56:41 EST
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.