RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 667197 - Using the config module to get non-existent options returns the string 'None'
Summary: Using the config module to get non-existent options returns the string 'None'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-rhsm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: J.C. Molet
URL:
Whiteboard:
Depends On:
Blocks: Entitlement-Beta
TreeView+ depends on / blocked
 
Reported: 2011-01-04 19:18 UTC by Rob Crittenden
Modified: 2011-02-23 21:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-23 21:51:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rob Crittenden 2011-01-04 19:18:03 UTC
Description of problem:

The behavior I saw in my registration client that calls registerConsumer(name="MY DOMAIN", type="domain") is a failure in creating a proxy connection. I don't have a proxy configured in /etc/rhsm/rhsm.conf

The problem is in the constructor for UEPConnection in: 

proxy_hostname=config.get('server', 'proxy_hostname'),

The call to config.get() is returning the string 'None' instead of the value None.

I'm currently working around it by a small change to config.py:

    def get(self, section, prop):
        if not self.has_section(section):
            self.add_section(section)
        v = SafeConfigParser.get(self, section, prop)
        if v == 'None':
            return None
        else:
            return v

Version-Release number of selected component (if applicable):

python-rhsm-0.94.10-1.fc14.noarch

Comment 1 Adrian Likins 2011-01-07 19:07:20 UTC
commit 3e593ca8bd4a55e0f5f369d44b7c64334a75c6cc
Author: Adrian Likins <alikins>
Date:   Fri Jan 7 13:14:46 2011 -0500

    667829: handle proxy config options being absent from rhsm.conf

    new config class doesn't like settings these to None, so they
    now get set to empty string



I believe the above commit will fix that issue.  Though technically, it slightly changes the api behaviour  (returns '' instead of the None it was supposed to before or the 'None' it was actually returning).

Comment 2 J.C. Molet 2011-01-24 21:19:43 UTC
After creating a user as above using: 

subscription-manager register --user=admin --password=admin --type=domain --name=domaintypetest

The user is successfully created with no errors while proxy variables are set to empty strings.

This is tested in version:
python-rhsm-0.94.15-1.git.0.b738ea1.el6.noarch


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