@@ -64,25 +64,6 @@ def print_warning(text):
6464def print_success (text ):
6565 print ('\033 [32m{}\033 [0m' .format (text ))
6666
67- def check_p5py_platform ():
68- import platform
69- system = platform .system ()
70- if 'Darwin' in system :
71- system_string = 'macosx'
72- elif 'Linux' in system :
73- arch , _ = platform .architecture ()
74- if '64' in arch :
75- system_string = 'linux64'
76- else :
77- system_string = 'linux32'
78- elif 'Java' in system :
79- raise RuntimeError ('Please run generator.py with python rather than jython.' )
80- elif 'Windows' in system :
81- raise RuntimeError ('Building (examples) is not supported on Windows.' )
82- else :
83- raise RuntimeError ("Don't know what system we're on." )
84- return system_string
85-
8667class ReferenceItem :
8768 '''Represents a single page of reference information.'''
8869 def __init__ (self , source_xml ):
@@ -207,6 +188,11 @@ def image_worker(base_cmd, workitems):
207188 print_error ("Image process terminated unsuccessfully." )
208189 if current :
209190 failed [current ['name' ]] = current
191+ # if the process just plain exited without doing anything,
192+ # add a sentinel value so it "counts" as an error in the calling
193+ # code (FIXME this is a hack)
194+ if len (failed ) == 0 :
195+ failed ['PROBLEM' ] = {'name' : 'problem' }
210196 return generated , failed
211197
212198def generate_images (items_dict , to_update , src_dir , processing_py_jar ,
@@ -551,7 +537,7 @@ def build(build_images, to_update):
551537 timedelta = datetime .datetime .now () - start
552538 print ('Build took {} seconds' .format (timedelta .seconds + timedelta .microseconds / 1000000 ))
553539 if failures :
554- print_error ('{} failures ' .format (failures ))
540+ print_error ('{} failure(s) ' .format (failures ))
555541 sys .exit (1 )
556542
557543def test ():
0 commit comments