Bug 772668 - Error while fetching org subscriptions when RH repos synced
Summary: Error while fetching org subscriptions when RH repos synced
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Katello
Classification: Retired
Component: Webservice API
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Garik Khachikyan
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-09 15:27 UTC by Kedar Bidarkar
Modified: 2015-01-04 21:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-13 11:27:12 UTC


Attachments (Terms of Use)

Description Kedar Bidarkar 2012-01-09 15:27:02 UTC
Description of problem:

[root@xxxxxl katello]# katello --username admin --password admin org subscriptions --name ACME_Corporation
error: 'NoneType' object is not iterable (more in the log file)



2012-01-09 14:51:43,241 [ERROR][MainThread] error() @ base.py:184 - 'NoneType' object is not iterable
2012-01-09 14:51:43,316 [ERROR][MainThread] error() @ base.py:185 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 226, in main
    return command.main(command_args)
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 149, in main
    return action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 358, in main
    return self.run()
  File "/usr/lib/python2.6/site-packages/katello/client/core/organization.py", line 203, in run
    updated_pool_info = [self.displayable_pool(pool) for pool in pools]
  File "/usr/lib/python2.6/site-packages/katello/client/core/organization.py", line 232, in displayable_pool
    p = dict(list(pool.items()) + list(self.sla(pool).items()))
  File "/usr/lib/python2.6/site-packages/katello/client/core/organization.py", line 219, in sla
    return {'sla': self.extract_sla_from_product(self.productApi.show(pool['productId']))}
  File "/usr/lib/python2.6/site-packages/katello/client/core/organization.py", line 228, in extract_sla_from_product
    sla_attr = [attr.get("value", "") for attr in p["attributes"] if attr.get("name", "") == "sla"]
TypeError: 'NoneType' object is not iterable


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


How reproducible:

Reproducible when RH repos are synced and fetching org subscriptions.

I have another org called KED_Corporation on the same katello server (only fedora14 repo synced) and it fetches org subscriptions successfully.

[root@XXXX katello]# katello --username admin --password admin org subscriptions --name KED_Corporation
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                          Organization's Subscriptions
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ProductName:    fed14
Consumed:       0
ContractNumber: 
Sla:            
Id:             8ac149d334a786380134b0ca416700c6
StartDate:      2012/01/06 00:00:00
EndDate:        2041/12/29 00:00:00


Steps to Reproduce:
1.
2.
3.
  
Actual results:

Face the above error, when  fetching org subscriptions when RH repos synced

Expected results:

Should fetch org subscriptions for RH and fedora repos

Additional info:


My setup :

ACME Corporation : RHEL 6Server , fedora15, fedora16 synced

KED_Corporation : fedora14


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