From ac2b274eb9f1787a31feed1c1a3711b4b6e4cbef Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 2 Jun 2024 16:40:44 +0100 Subject: Use f-strings --- tools/mkdeps.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/mkdeps.py b/tools/mkdeps.py index 8881cf0..28b7ff9 100755 --- a/tools/mkdeps.py +++ b/tools/mkdeps.py @@ -63,7 +63,7 @@ def main(): try: out = subprocess.run(cmd + [d], stdout=subprocess.PIPE, stderr=subprocess.PIPE) if out.returncode: - sys.exit("Error: %s" % out.stderr) + sys.exit(f"Error: {out.stderr}") except FileNotFoundError: sys.exit(f"Error: {cmd[0]} not found in the PATH") @@ -74,7 +74,7 @@ def main(): old = open(args.deps, "rt").read() except Exception: if args.verbose: - print("%r not found, will generate" % args.deps) + print(f"{args.deps} not found, will generate") old = None new = "\n".join(result) @@ -84,7 +84,7 @@ def main(): fd.write(new) else: if args.verbose: - print("%r didn't change, skipping" % args.deps) + print(f"{args.deps} didn't change, skipping") if __name__ == "__main__": -- cgit v1.2.3