PR#1950: print warn to stderr instead of stdout

Merges #1950
https://pagure.io/koji/pull-request/1950

Fixes: #1152
https://pagure.io/koji/issue/1152
hostinfo CLI call should send error message to error output for non existing host
This commit is contained in:
Tomas Kopecek 2020-02-04 09:17:45 +01:00
commit 87f716d194

View file

@ -3190,7 +3190,7 @@ def anon_handle_hostinfo(goptions, session, args):
host = int(host)
info = session.getHost(host)
if info is None:
print("No such host: %s\n" % host)
warn("No such host: %s\n" % host)
continue
print("Name: %(name)s" % info)
print("ID: %(id)d" % info)