From 250f60b4f7b0e1a29abcce03c98cba3fe727cb20 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Tue, 11 Apr 2006 11:31:02 +0000 Subject: [PATCH] * src/images/mk_blue_marble.py: Properly exit on error to let `make` stop in that case. svn: r6310 --- gramps2/ChangeLog | 4 ++++ gramps2/src/images/mk_blue_marble.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 4bc05d36b..61a3cd7cf 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-04-11 Martin Hawlisch + * src/images/mk_blue_marble.py: Properly exit on error to let `make` + stop in that case. + 2006-04-10 Martin Hawlisch * src/DataViews/_MapView.py: Reworked to display multiple smaller tiled map images diff --git a/gramps2/src/images/mk_blue_marble.py b/gramps2/src/images/mk_blue_marble.py index 55c82b93f..f8c51bb1c 100644 --- a/gramps2/src/images/mk_blue_marble.py +++ b/gramps2/src/images/mk_blue_marble.py @@ -14,6 +14,7 @@ # This images are public domain. import os +import sys tile_defines = [] @@ -28,7 +29,7 @@ def process_file( imagefile, image_width, image_height, map_x, map_y, map_width, (tile_size,tile_size,x*tile_size,y*tile_size,outfile,imagefile) print cmd if os.system( cmd): - print "ERROR" + sys.exit("ERROR, image crop using jpegtran (part of libjpeg-progs) failed.") else: print "tile %s already exists" % outfile tile_width = map_width/(image_width/tile_size) @@ -46,7 +47,7 @@ def scale_down( infile, outfile, new_width): cmd = "convert %s -resize %d %s" % (infile,new_width,outfile) print cmd if os.system( cmd): - print "ERROR" + sys.exit("ERROR. Scaling down using imagemagick failed.") else: print "scaled down image %s already exists" % outfile @@ -56,8 +57,7 @@ def fetch_image( server, filename): cmd = "wget -v %s/%s" % (server, sourcemap_midres) print cmd if os.system( cmd): - print "ERROR" - + sys.exit("ERROR, image download using wget failed.") else: print "mapfile %s already downloaded" % filename