Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhn_register module is not compatible with Python 2.4 #3193

Closed
E-M opened this issue Jun 13, 2013 · 1 comment
Closed

rhn_register module is not compatible with Python 2.4 #3193

E-M opened this issue Jun 13, 2013 · 1 comment

Comments

@E-M
Copy link
Contributor

E-M commented Jun 13, 2013

rhn_register module is incompatible with Python 2.4 (which is shipped with RHEL5). In particular line 184:

return url.netloc.replace('xmlrpc.','')

Python 2.4.x does not support tuple attributes.

Here is the example on system with Python 2.4.3:

>>> url = urlparse.urlparse('https://xmlrpc.rhn.redhat.com/XMLRPC')
>>> print url
('https', 'xmlrpc.rhn.redhat.com', '/XMLRPC', '', '', '')
>>> print url.netloc.replace('xmlrpc.','')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'tuple' object has no attribute 'netloc'

And here is the same example on system with Python 2.7.3

>>> url=urlparse.urlparse('https://xmlrpc.rhn.redhat.com/XMLRPC')
>>> print url
ParseResult(scheme='https', netloc='xmlrpc.rhn.redhat.com', path='/XMLRPC', params='', query='', fragment='')
>>> print url.netloc.replace('xmlrpc.','')
rhn.redhat.com
@E-M
Copy link
Contributor Author

E-M commented Jun 13, 2013

Fixed in PR#3194

mpdehaan pushed a commit that referenced this issue Jun 17, 2013
mpdehaan added a commit that referenced this issue Jun 17, 2013
Fixed Issue #3193 - make rhn_register module compatible with EL 5
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants