CLI edit-channel set default value for None and error msg to stderr.
Fixes: https://pagure.io/koji/issue/3534
This commit is contained in:
parent
fb5339510c
commit
f11628000e
2 changed files with 25 additions and 1 deletions
|
|
@ -348,6 +348,7 @@ def handle_edit_channel(goptions, session, args):
|
|||
cinfo = session.getChannel(args[0])
|
||||
if not cinfo:
|
||||
error("No such channel: %s" % args[0])
|
||||
result = None
|
||||
try:
|
||||
result = session.editChannel(args[0], **vals)
|
||||
except koji.GenericError as ex:
|
||||
|
|
@ -357,7 +358,7 @@ def handle_edit_channel(goptions, session, args):
|
|||
error("editChannel is available on hub from Koji 1.26 version, your version is %s" %
|
||||
version)
|
||||
else:
|
||||
print(msg)
|
||||
warn(msg)
|
||||
if not result:
|
||||
error("No changes made, please correct the command line")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue