Commit d70b3058 authored by Iustin Pop's avatar Iustin Pop
Browse files

Change exit code of gnt-backup list

Currently gnt-backup list exits with the same error code even if can't
contact som nodes for backup information.

The patch changes it to return 1 instead in this case.

Reviewed-by: imsnah
parent ebf366ee
...@@ -45,6 +45,7 @@ def PrintExportList(opts, args): ...@@ -45,6 +45,7 @@ def PrintExportList(opts, args):
""" """
exports = GetClient().QueryExports(opts.nodes) exports = GetClient().QueryExports(opts.nodes)
retcode = 0
for node in exports: for node in exports:
ToStdout("Node: %s", node) ToStdout("Node: %s", node)
ToStdout("Exports:") ToStdout("Exports:")
...@@ -53,6 +54,8 @@ def PrintExportList(opts, args): ...@@ -53,6 +54,8 @@ def PrintExportList(opts, args):
ToStdout("\t%s", instance_name) ToStdout("\t%s", instance_name)
else: else:
ToStdout(" Could not get exports list") ToStdout(" Could not get exports list")
retcode = 1
return retcode
def ExportInstance(opts, args): def ExportInstance(opts, args):
......
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