Project

General

Profile

Actions

Bug #17751

closed

"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 7 years ago. Updated almost 6 years ago.

Status:
Duplicate
Priority:
Urgent
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.
Actions #1

Updated by Andrew Kofink over 7 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
  • translation missing: en.field_release set to 166

Duplicates 16852

Actions

Also available in: Atom PDF