Description of problem: When calling softwarechannel_setorgaccesstree or softwarechannel_getorgaccesstree on a nonexistent channel, the following error is shown: "ERROR: Can't call softwarechannel_setorgaccesstree on child channel!" or "ERROR: Can't call softwarechannel_getorgaccesstree on child channel!" This error does not reflect what really happened. How reproducible: Deterministic Steps to Reproduce: 1. Have a satellite without software channel $CHANNEL 2. # spacecmd -- softwarechannel_getorgaccesstree $CHANNEL Actual results: Error message Expected results: No error message, access rights of the channel shown (or set, respectively) Additional info: Merely changing an error message to include both possibilities (channel does not exist or is not a base channel) should be sufficient. Will provide patch.
Pull request https://github.com/spacewalkproject/spacewalk/pull/535 . Additionally fixed the same issue in softwarechannel_clonetree.
PR accepted: spacewalk.git(master): 75d53343c54a8289d2a757be8e29fd19c98482d2
Verified with spacecmd-2.5.0-12 . # spacecmd -- softwarechannel_getorgaccesstree "nonexistentchannel" INFO: Connected to https://<URL>/rpc/api as admin ERROR: Channel does not exist or is not a base channel! softwarechannel_getorgaccesstree: Get the org-access for a software base channel and its children usage: softwarechannel_getorgaccesstree [CHANNEL] # spacecmd -- softwarechannel_setorgaccesstree -d "nonexistentchannel" INFO: Connected to https://<URL>/rpc/api as admin ERROR: Channel does not exist or is not a base channel! softwarechannel_setorgaccesstree: set the org-access for a software base channel and its children usage: [...] # spacecmd -- softwarechannel_clonetree -s nonexistentchannel -p pr- INFO: Connected to https://kvm-02-guest01.rhts.eng.bos.redhat.com/rpc/api as admin ERROR: Channel does not exist or is not a base channel! softwarechannel_clonetree: Clone a software channel and its child channels usage: [...]