From: Reinhold Kainhofer Date: Tue, 30 Aug 2011 20:21:00 +0000 (+0200) Subject: Fix 1825: Convert-ly shall also print output if no replacement was done X-Git-Tag: release/2.15.10-1~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=45a78dfa12df96f7271de565c3d9ad8da7ccc065;p=lilypond.git Fix 1825: Convert-ly shall also print output if no replacement was done 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 --- diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index c0c7ee3e35..930c11da10 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -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: