Project

General

Profile

Bug #17751

"hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription

Added by Andrew Kofink over 5 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Urgent
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1394218
Description of problem:
If one or more hosts don't have a valid subscription then running "hammer csv content-hosts --export" to save the current assignment of subscriptions fails with error "Error: undefined method `clear' for nil:NilClass"

Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli_import-0.11.2-1.el7sat
How reproducible:
Always
Steps to Reproduce:
1. Ensure that at least one content host does not have a valid subscription
2. Run "hammer csv content-hosts --export --file content-hosts-export.csv --itemized-subscriptions"
3.
Actual results:
Error: undefined method `clear' for nil:NilClass
File content-hosts-export.csv only contains the first header line.
Expected results:
Hosts without subscriptions are skipped and output file is successfully created with correct subscription assignments for hosts with valid subscriptions.
Additional info:
Adding option "--continue-on-error" makes no difference.

History

#1 Updated by Andrew Kofink over 5 years ago

  • Subject changed from "hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription to "hammer csv content-hosts --export" fails with "Error: undefined method `[]' for nil:NilClass" if any host doesn't have a valid subscription
  • Status changed from New to Duplicate
  • Legacy Backlogs Release (now unused) set to 166

Duplicates 16852

Also available in: Atom PDF