rteval/rteval-rtevalReport.py-Convert-regular-strings-to-f-.patch

43 lines
1.6 KiB
Diff
Raw Normal View History

From 96ce02046afedfac27c69c30d6ee6b9511238131 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 9 Nov 2022 12:47:09 -0500
Subject: rteval: rtevalReport.py: Convert regular strings to f-strings
Convert regular strings to f-strings in rtevalReport.py
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/rtevalReport.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rteval/rtevalReport.py b/rteval/rtevalReport.py
index fdfaed560cfa..af3e6c9a703b 100644
--- a/rteval/rtevalReport.py
+++ b/rteval/rtevalReport.py
@@ -100,11 +100,11 @@ class rtevalReport:
def _show_report(self, xmlfile, xsltfile):
'''summarize a previously generated xml file'''
- print("Loading %s for summarizing" % xmlfile)
+ print(f"Loading {xmlfile} for summarizing")
xsltfullpath = os.path.join(self.__installdir, xsltfile)
if not os.path.exists(xsltfullpath):
- raise RuntimeError("can't find XSL template (%s)!" % xsltfullpath)
+ raise RuntimeError(f"can't find XSL template ({xsltfullpath})!")
xmlreport = xmlout.XMLOut('rteval', self.__version)
xmlreport.LoadReport(xmlfile)
@@ -131,7 +131,7 @@ class rtevalReport:
def _tar_results(self):
if not os.path.isdir(self.__reportdir):
- raise RuntimeError("no such directory: %s" % self.__reportdir)
+ raise RuntimeError(f"no such directory: {self.__reportdir}")
dirname = os.path.dirname(self.__reportdir)
rptdir = os.path.basename(self.__reportdir)
--
2.40.1