diff mbox series

[v2,08/10] rteval: Use f-strings in tools.py

Message ID 20230601202734.813515-9-ashelat@redhat.com
State Superseded
Headers show
Series Cover Letter | expand

Commit Message

Anubhav Shelat June 1, 2023, 8:27 p.m. UTC
Use f-strings in tools.py

Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
 rteval/sysinfo/tools.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Kacur June 12, 2023, 6:59 p.m. UTC | #1
On Thu, 1 Jun 2023, Anubhav Shelat wrote:

> Use f-strings in tools.py
> 
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
>  rteval/sysinfo/tools.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rteval/sysinfo/tools.py b/rteval/sysinfo/tools.py
> index 3993da413d8a..aa00b3d3eafc 100644
> --- a/rteval/sysinfo/tools.py
> +++ b/rteval/sysinfo/tools.py
> @@ -40,5 +40,5 @@ def getcmdpath(which):
>                  pathSave[which] = cmdfile
>                  break
>          if not pathSave[which]:
> -            raise RuntimeError("Command '%s' is unknown on this system" % which)
> +            raise RuntimeError(f"Command '{which}' is unknown on this system")
>      return pathSave[which]
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>
diff mbox series

Patch

diff --git a/rteval/sysinfo/tools.py b/rteval/sysinfo/tools.py
index 3993da413d8a..aa00b3d3eafc 100644
--- a/rteval/sysinfo/tools.py
+++ b/rteval/sysinfo/tools.py
@@ -40,5 +40,5 @@  def getcmdpath(which):
                 pathSave[which] = cmdfile
                 break
         if not pathSave[which]:
-            raise RuntimeError("Command '%s' is unknown on this system" % which)
+            raise RuntimeError(f"Command '{which}' is unknown on this system")
     return pathSave[which]