From 2fb5f86ad2d2edc1903d76d66b354da233defa5d Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Thu, 19 Jun 2014 19:36:26 +0000 Subject: Make distbuild-cluster script a bit friendlier --- scripts/distbuild-cluster.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/distbuild-cluster.py b/scripts/distbuild-cluster.py index e5bada58..a8cae85e 100644 --- a/scripts/distbuild-cluster.py +++ b/scripts/distbuild-cluster.py @@ -13,6 +13,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +from __future__ import print_function + import os import subprocess import sys @@ -70,7 +72,12 @@ class Build(object): if __name__ == '__main__': - cluster_name = morphlib.util.strip_morph_extension(sys.argv[1]) + if len(sys.argv) != 2: + print ('usage: %s cluster_morph' % sys.argv[0], file=sys.stderr) + sys.exit(1) + + cluster_morph = sys.argv[1] + cluster_name = morphlib.util.strip_morph_extension(cluster_morph) cluster = read_morph(cluster_name, kind='cluster') system_list = [system['morph'] for system in cluster['systems']] -- cgit v1.2.1