]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
check-symfile: Use pythonesque string formatting instead of perl
authorPeter Krempa <pkrempa@redhat.com>
Mon, 25 Nov 2019 15:33:53 +0000 (16:33 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 26 Nov 2019 09:01:35 +0000 (10:01 +0100)
Commit d30a1ad0443 translated the symbol file checker from perl to
python by doing a literal translation in most cases. Unfortunately one
string formatting operation was not really translated into python
leaving users with non-helpful error:

'Symbol $1 is listed twice'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
scripts/check-symfile.py

index 0c025919911887e7fbbbc7117bc073dcaf367fa5..7aeb047d890be0b05c506c538faa6e371d840789 100755 (executable)
@@ -52,7 +52,7 @@ with open(symfile, "r") as fh:
         line = line.strip(";")
 
         if line in wantsyms:
-            print("Symbol $1 is listed twice", file=sys.stderr)
+            print("Symbol %s is listed twice" % line, file=sys.stderr)
             ret = 1
         else:
             wantsyms[line] = True