[master-next] convert-variable-renames: change f-string back

Message ID 20220217174417.731425-1-saul.wold@windriver.com
State New
Headers show
Series [master-next] convert-variable-renames: change f-string back | expand

Commit Message

Saul Wold Feb. 17, 2022, 5:44 p.m. UTC
Add back Copyright info with update.

Signed-off-by: Saul Wold <saul.wold@windriver.com>
---
 scripts/contrib/convert-variable-renames.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Patch

diff --git a/scripts/contrib/convert-variable-renames.py b/scripts/contrib/convert-variable-renames.py
index 28a3df597e..bc3e01887c 100755
--- a/scripts/contrib/convert-variable-renames.py
+++ b/scripts/contrib/convert-variable-renames.py
@@ -3,6 +3,9 @@ 
 # Conversion script to rename variables to versions with improved terminology.
 # Also highlights potentially problematic langage and removed variables.
 #
+# Copyright (C) 2021 Richard Purdie
+# Copyright (C) 2022 Wind River Systems, Inc.
+#
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
@@ -56,7 +59,7 @@  context_check_list = [
 
 def processfile(fn):
 
-    print(f"processing file '{fn}'")
+    print("processing file '%s'" % fn)
     try:
         fh, abs_path = tempfile.mkstemp()
         modified = False
@@ -75,13 +78,13 @@  def processfile(fn):
                     # Find removed names
                     for removed_name in removed_list:
                         if removed_name in line:
-                            print(f"{fn} needs further work at line {lineno} because {removed_name} has been deprecated")
+                            print("%s needs further work at line %s because has been deprecated" % (fn, lineno, remove_name))
                     for check_word in context_check_list:
                         if re.search(check_word, line, re.IGNORECASE):
-                            print(f"{fn} needs further work at line {lineno} since it contains {check_word}")
+                            print("%s needs further work at line %s since it contains %s"% (fn, lineno, check_word))
                     new_file.write(line)
             if modified:
-                print(f"*** Modified file '{fn}'")
+                print("*** Modified file '%s'" % (fn))
                 shutil.copymode(fn, abs_path)
                 os.remove(fn)
                 shutil.move(abs_path, fn)