Project

General

Profile

Actions

Bug #11355

closed

Hammer JSON output not returning valid JSON for simple messages

Added by Bryan Kearney over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
easy
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1253737
Description of problem:
Hammer currently does not return valid json, when requested, if the output is a simple message like "____ deleted" or "Activation key copied".

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

How reproducible:
Always

Steps to Reproduce:
1. Run a command that only returns a message stating that it passed, specifying --output=json
2. View results

Actual results:
hammer --output=json activation-key copy --name=tester --new-name=copykey --organization-id=3
Activation key copied

Expected results:
hammer --output=json activation-key copy --name=tester --new-name=copykey --organization-id=3 {'Message':'Activation key copied'}

Actions

Also available in: Atom PDF