Bug 1014999 - satellite-upgrade-estimates script fails with error "TypeError: 'NoneType' object is unsubscriptable" if no packages available on satellite
Summary: satellite-upgrade-estimates script fails with error "TypeError: 'NoneType' ob...
Keywords:
Status: CLOSED DUPLICATE of bug 1014986
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 560
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-03 09:37 UTC by Ashish Humbe
Modified: 2013-10-03 09:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-03 09:47:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ashish Humbe 2013-10-03 09:37:56 UTC
Description of problem:

satellite-upgrade-estimates script fails with error "TypeError: 'NoneType' object is unsubscriptable" if no packages available on satellite

#  /etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates
Will you be upgrading both the operating system and Red Hat Satellite? [N] 
Will you be migrating your Red Hat Satellite database from Oracle to PostgreSQL? [N] y

Computing ...
Traceback (most recent call last):
  File "/etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates.org", line 211, in <module>
    populate_segment_sizes()
  File "/etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates.org", line 84, in populate_segment_sizes
    segment_sizes[segment_name] = h.fetchall_dict()[0]['bytes']
TypeError: 'NoneType' object is unsubscriptable


Version-Release number of selected component (if applicable):
rhn-upgrade-5.6.0.38-1.el6sat.noarch

How reproducible:
always with Red Hat satellite have no packages available 

Steps to Reproduce:
1. Take freshly installed Satellite v 5.4.1 or 5.5 
2. Install latest rhn-upgrade package - rhn-upgrade-5.6.0.38-1.el6sat.noarch
3. Run satellite-upgrade-estimates script 

Actual results:

#  /etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates
Will you be upgrading both the operating system and Red Hat Satellite? [N] 
Will you be migrating your Red Hat Satellite database from Oracle to PostgreSQL? [N] y

Computing ...
Traceback (most recent call last):
  File "/etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates.org", line 211, in <module>
    populate_segment_sizes()
  File "/etc/sysconfig/rhn/satellite-upgrade/scripts/satellite-upgrade-estimates.org", line 84, in populate_segment_sizes
    segment_sizes[segment_name] = h.fetchall_dict()[0]['bytes']
TypeError: 'NoneType' object is unsubscriptable


Expected results:

satellite-upgrade-estimates script should through proper error message instead of exception.

Comment 1 Milan Zázrivec 2013-10-03 09:47:27 UTC

*** This bug has been marked as a duplicate of bug 1014986 ***


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