Bug 684292 - Command yum repolist generates a Traceback on RHEL 6.1
Summary: Command yum repolist generates a Traceback on RHEL 6.1
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Registration
Version: 540
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2011-03-11 17:37 UTC by Dimitar Yordanov
Modified: 2014-07-04 13:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-04 13:29:03 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dimitar Yordanov 2011-03-11 17:37:58 UTC
Description of problem:
If a RHEL6.1 system is registered to a Satellite that has no channels, command "yum repolist" generates a Traceback.
The problem is not presented on RHEL5.6


Version-Release number of selected component (if applicable):
RHEL6.1 - RHEL6.1-20110309.n.0
yum-3.2.29-7.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1.Execute the reproducer script. (See Additional info:)
2.yum repolist

  
Actual results:

# yum repolist
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
INFO:rhsm-app.repolib:repos updated: 0
This system is not subscribed to any channels.
RHN channel support will be disabled.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 267, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 120, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 1025, in doCommand
    if nm_len < utf8_width(rname):
  File "/usr/lib/python2.6/site-packages/yum/i18n.py", line 218, in utf8_width
    for (ucs, bytes) in __utf8_iter_ucs(msg):
  File "/usr/lib/python2.6/site-packages/yum/i18n.py", line 174, in __utf8_iter_ucs
    for byte0 in uiter:
  File "/usr/lib/python2.6/site-packages/yum/i18n.py", line 170, in __utf8_iter_ints
    for byte in to_utf8(msg):
TypeError: 'NoneType' object is not iterable


Expected results:
No Traceback.

Additional info:

Reproducer:
#!/usr/bin/env python
import sys, xmlrpclib, os

RHN_USER='admin'
RHN_PASS='admin'
RHN_SERVER='SATELLITE_SERVER_NAME'

client = xmlrpclib.Server("http://SATELLITE_SERVER_NAME/rpc/api" , verbose=0)
key = client.auth.login(RHN_USER,RHN_PASS)

ent=[]
ent.append('monitoring_entitled')
ent.append('provisioning_entitled')
# Create Activation Key
ACTIV_KEY=client.activationkey.create(key, '', '', '', ent, False)
# Register the system
cmd_string="rhnreg_ks  --serverUrl=http://%s/XMLRPC  --activationkey=%s --profilename=Test_Reg_No_Chann_RHEL61 --force" % (RHN_SERVER ,ACTIV_KEY)
os.system(cmd_string)


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