Bug 1014999 - satellite-upgrade-estimates script fails with error "TypeError: 'NoneType' object is unsubscriptable" if no packages available on satellite
satellite-upgrade-estimates script fails with error "TypeError: 'NoneType' ob...
Status: CLOSED DUPLICATE of bug 1014986
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades (Show other bugs)
560
All Linux
medium Severity medium
: ---
: ---
Assigned To: Milan Zázrivec
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-03 05:37 EDT by Ashish Humbe
Modified: 2013-10-03 05:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-03 05:47:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ashish Humbe 2013-10-03 05:37:56 EDT
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 05:47:27 EDT

*** 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.