]> git.donarmstrong.com Git - lilypond.git/commitdiff
(ic_p.make_include_option): set error_p for
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 18 Jun 2004 23:22:33 +0000 (23:22 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 18 Jun 2004 23:22:33 +0000 (23:22 +0000)
single file error.

ChangeLog
python/lilylib.py
scripts/lilypond.py

index 50553656f86f9e6fcb213a1bf3d30408626a4bb3..f4b922c4f2e9fabeb2f6c553aa1ea7cca3c7380d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-06-19  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * scripts/lilypond.py (ic_p.make_include_option): set error_p for
+       single file error.
+
        * lily/bar-line.cc (compound_barline): add support for unbroken ||:
 
 2004-06-17  Carl Sorensen (carl_sorensen@byu.edu)
index da44570a57b45cee8a12344d460216829c832d1e..df6ee12a6178a0202b7aee3f98a1cd98bcb99ddf 100644 (file)
@@ -129,6 +129,7 @@ def exit (i):
        if __main__.verbose_p:
                raise _ ('Exiting (%d)...') % i
        else:
+               print 'ex thoto' , i 
                sys.exit (i)
                
 def getopt_args (opts):
@@ -276,7 +277,7 @@ def read_pipe (cmd, mode = 'r'):
                if error_log_file:
                        os.unlink (error_log_file)
 
-               exit (status)
+               exit (1)
                
        if __main__.verbose_p:
                progress ('\n')
@@ -332,7 +333,7 @@ Exit status of CMD '''
                                sys.stderr.write (open (error_log_file).read ())
                        if error_log_file:
                                os.unlink (error_log_file)
-                       exit (status)
+                       exit (1)
 
        if error_log_file:
                os.unlink (error_log_file)
index 9e0e160ef11cd9c88c541d89d87ce086699cffde..6e2bf6c5d5d775d73e14e0582228377c827be036 100644 (file)
@@ -136,6 +136,9 @@ option_definitions = [
 safe_mode_p = 0
 preview_p = 0
 page_images_p = 0
+
+# need global variable. sys.exit() raises an exception, which is handled
+# to do cleanups.
 lilypond_error_p = 0
 html_p = 0
 
@@ -247,14 +250,15 @@ def run_lilypond (files, dep_prefix):
                ly.exit (status)
                        
        if status:
+               global lilypond_error_p
                sys.stderr.write ('\n')
                if len (files) == 1:
                        ly.error (_ ("LilyPond failed on input file %s (exit status %d)") % (files[0], exit_status))
-                       ly.exit (status)
+                       lilypond_error_p = 1
+                       ly.exit (1)
                else:
                        ly.error (_ ("LilyPond failed on an input file (exit status %d)") % exit_status)
                        ly.error (_ ("Continuing..."))
-                       global lilypond_error_p
                        lilypond_error_p = 1
                
 
@@ -790,7 +794,6 @@ if 1:
                        ### this should only catch lilypond nonzero exit  status
                        ### --hwn
 
-                       
                        # TODO: friendly message about LilyPond setup/failing?
                        #
                        targets = []