From 45a78dfa12df96f7271de565c3d9ad8da7ccc065 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Tue, 30 Aug 2011 22:21:00 +0200 Subject: [PATCH] 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 --- scripts/convert-ly.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: -- 2.39.5