HomeClusterLabs Projects

Low: tools: Remove extra newlines from crm_resource output.

Description

Low: tools: Remove extra newlines from crm_resource output.

The print at the top of cli_resource_{delete,update}_attribute is to
make its output a little more visible in case find_resource_attr prints
anything. However, if the attribute being asked for does not exist on
the attribute, you'll get an extra newline printed out.

Unless there's something more serious going on, find_resource_attr will
only print anything out if it's going to return EINVAL. So, just change
the tests in the caller to only print out the extra newline if that was
the return value.

Note that there's still one case where the extra newline will happen,
and that's error/trace debug logging. Since this shouldn't come up too
often that the user can see, I've left it in. The changes to the test
cases reflect this.

See https://bugs.clusterlabs.org/show_bug.cgi?id=5288.

Details

Provenance
clumensAuthored on Nov 16 2018, 4:19 PM
Parents
rPf8f5a5a6c7f0: Low: tools: Change crm_resource output for attributes.
Branches
Unknown
Tags
Unknown

Event Timeline