summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-06-19 19:36:26 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-06-19 19:37:05 +0000
commit2fb5f86ad2d2edc1903d76d66b354da233defa5d (patch)
tree6415506e1e38d41ba85e85c1e6a6d81c693d4125
parent913147ff9f1e8cf6e8b80eb032dace635e24944f (diff)
downloaddefinitions-baserock/richardipsum/tweak_distbuild_cluster.tar.gz
Make distbuild-cluster script a bit friendlierbaserock/richardipsum/tweak_distbuild_cluster
-rw-r--r--scripts/distbuild-cluster.py9
1 files changed, 8 insertions, 1 deletions
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']]