]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[30875] Fix missing f-string in error message
authorCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 13 Sep 2024 08:09:12 +0000 (10:09 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 13 Sep 2024 11:30:39 +0000 (13:30 +0200)
src/Container/SALOME_PyNode.py

index 8cbbca92237206599d85e1bb4a064abcbd5fa136..c642d2b14ea71f97ac97878876f025025265017a 100644 (file)
@@ -1042,7 +1042,7 @@ def ExchangeModeServerSideFactory( exchangeMode ):
   elif exchangeMode == "TCP":
     return ExchangeContextUsingTCP()
   else:
-    raise RuntimeError( "ExchangeModeServerSideFactory : {} not in [File,TCP]" )
+    raise RuntimeError( f"ExchangeModeServerSideFactory : {exchangeMode} not in [File,TCP]" )
 
 class ExchangeContextCltAbs(abc.ABC):
   def __init__(self):
@@ -1120,7 +1120,7 @@ def ExchangeModeCltSideFactory( exchangeMode, keepFilesToReplay ):
   elif exchangeMode == "TCP":
     return ExchangeContextUsingTCPClt()
   else:
-    raise RuntimeError( "ExchangeModeCltSideFactory : {} not in [File,TCP]" )
+    raise RuntimeError( f"ExchangeModeCltSideFactory : {exchangeMode} not in [File,TCP]" )
 
 def ExecCrashProofGeneric( code, context, outargsname, containerRef, instanceOfLogOfCurrentSession, keepFilesToReplay, closeEyesOnErrorAtExit):
   """