diff --git a/lib/client/gnt_node.py b/lib/client/gnt_node.py index 5f3f4207c67b4b329a02dff65495701bea844fe4..8dfba722ca1afab2ef832ed5e753f687328f7088 100644 --- a/lib/client/gnt_node.py +++ b/lib/client/gnt_node.py @@ -138,6 +138,9 @@ def _RunSetupSSH(options, nodes): @param nodes: The nodes to setup """ + + assert nodes, "Empty node list" + cmd = [constants.SETUP_SSH] # Pass --debug|--verbose to the external script if set on our invocation diff --git a/tools/setup-ssh b/tools/setup-ssh index 50b7b7bb75b384ad692470354381f5ee79e3afbe..4e09078158300786a6b21a1e7f1f796367066382 100755 --- a/tools/setup-ssh +++ b/tools/setup-ssh @@ -1,7 +1,7 @@ #!/usr/bin/python # -# Copyright (C) 2010 Google Inc. +# Copyright (C) 2010, 2012 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -253,6 +253,10 @@ def ParseOptions(): (options, args) = parser.parse_args() + if not args: + parser.print_help() + sys.exit(constants.EXIT_FAILURE) + return (options, args)