Commit d9ef8346 authored by Yuto KAWAMURA(kawamuray)'s avatar Yuto KAWAMURA(kawamuray) Committed by Hrvoje Ribicic

Fix invalid message from gnt-os

When we still don't have any os scripts installed, running gnt-os
diagnose or gnt-os info foo(whatever) shows an error message "Can't get
the OS list" even if the request has been succeeded.
The OpOsDiagnose can return a blank list, so we should check whether
the result is None.
Signed-off-by: default avatarYuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 29625e5a
......@@ -88,7 +88,7 @@ def ShowOSInfo(opts, args):
names=[])
result = SubmitOpCode(op, opts=opts)
if not result:
if result is None:
ToStderr("Can't get the OS list")
return 1
......@@ -156,7 +156,7 @@ def DiagnoseOS(opts, args):
"blacklisted"], names=[])
result = SubmitOpCode(op, opts=opts)
if not result:
if result is None:
ToStderr("Can't get the OS list")
return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment