]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 1825: Convert-ly shall also print output if no replacement was done
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 30 Aug 2011 20:21:00 +0000 (22:21 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 3 Sep 2011 10:44:39 +0000 (12:44 +0200)
This allows automatically piping ALL files through convert-ly in a script without having to worry that some files don't produce any converted output

scripts/convert-ly.py

index c0c7ee3e354fdee020bfeeb971cf92f91be57ec0..930c11da107db7bb24345a13216beaf6dc9c5fce 100644 (file)
@@ -182,9 +182,11 @@ string."""
     conv_list = get_conversions (from_version, to_version)
 
     error_file_write (_ ("Applying conversion: "))
-        
+
     last_conversion = ()
     try:
+        if not conv_list:
+            last_conversion = to_version
         for x in conv_list:
             error_file_write (tup_to_str (x[0]))
             if x != conv_list[-1]:
@@ -275,7 +277,7 @@ def do_one_file (infile_name):
         elif not global_options.skip_version_add:
             result = newversion + '\n' + result
             
-        error_file_write ('\n')            
+        error_file_write ('\n')
     
         if global_options.edit:
             try: