@@ -372,7 +372,7 @@ def _omc_resolve(self, pathstr: str) -> str:
372372 'cd(omcpath_cwd)' )
373373
374374 try :
375- result = self ._session .sendExpression (command = expression , parsed = False )
375+ result = self ._session .sendExpression (expr = expression , parsed = False )
376376 result_parts = result .split ('\n ' )
377377 pathstr_resolved = result_parts [1 ]
378378 pathstr_resolved = pathstr_resolved [1 :- 1 ] # remove quotes
@@ -573,7 +573,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
573573 The complete error handling of the OMC result is done within this method using '"getMessagesStringInternal()'.
574574 Caller should only check for OMCSessionException.
575575 """
576- return self .omc_process .sendExpression (command = command , parsed = parsed )
576+ return self .omc_process .sendExpression (expr = command , parsed = parsed )
577577
578578
579579class PostInitCaller (type ):
@@ -856,9 +856,9 @@ def execute(self, command: str):
856856 category = DeprecationWarning ,
857857 stacklevel = 2 )
858858
859- return self .sendExpression (command , parsed = False )
859+ return self .sendExpression (expr = command , parsed = False )
860860
861- def sendExpression (self , command : str , parsed : bool = True ) -> Any :
861+ def sendExpression (self , expr : str , parsed : bool = True ) -> Any :
862862 """
863863 Send an expression to the OMC server and return the result.
864864
@@ -869,12 +869,12 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
869869 if self ._omc_zmq is None :
870870 raise OMCSessionException ("No OMC running. Please create a new instance of OMCSession!" )
871871
872- logger .debug ("sendExpression(%r, parsed=%r)" , command , parsed )
872+ logger .debug ("sendExpression(%r, parsed=%r)" , expr , parsed )
873873
874874 loop = self ._timeout_loop (timestep = 0.05 )
875875 while next (loop ):
876876 try :
877- self ._omc_zmq .send_string (str (command ), flags = zmq .NOBLOCK )
877+ self ._omc_zmq .send_string (str (expr ), flags = zmq .NOBLOCK )
878878 break
879879 except zmq .error .Again :
880880 pass
@@ -888,7 +888,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
888888 logger .error (f"Docker did not start. Log-file says:\n { log_content } " )
889889 raise OMCSessionException (f"No connection with OMC (timeout={ self ._timeout } )." )
890890
891- if command == "quit()" :
891+ if expr == "quit()" :
892892 self ._omc_zmq .close ()
893893 self ._omc_zmq = None
894894 return None
@@ -898,13 +898,13 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
898898 if result .startswith ('Error occurred building AST' ):
899899 raise OMCSessionException (f"OMC error: { result } " )
900900
901- if command == "getErrorString()" :
901+ if expr == "getErrorString()" :
902902 # no error handling if 'getErrorString()' is called
903903 if parsed :
904904 logger .warning ("Result of 'getErrorString()' cannot be parsed!" )
905905 return result
906906
907- if command == "getMessagesStringInternal()" :
907+ if expr == "getMessagesStringInternal()" :
908908 # no error handling if 'getMessagesStringInternal()' is called
909909 if parsed :
910910 logger .warning ("Result of 'getMessagesStringInternal()' cannot be parsed!" )
@@ -958,7 +958,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
958958 log_level = log_raw [0 ][8 ]
959959 log_id = log_raw [0 ][9 ]
960960
961- msg_short = (f"[OMC log for 'sendExpression({ command } , { parsed } )']: "
961+ msg_short = (f"[OMC log for 'sendExpression({ expr } , { parsed } )']: "
962962 f"[{ log_kind } :{ log_level } :{ log_id } ] { log_message } " )
963963
964964 # response according to the used log level
@@ -980,7 +980,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
980980 msg_long_list .append (msg_long )
981981 if has_error :
982982 msg_long_str = '\n ' .join (f"{ idx :02d} : { msg } " for idx , msg in enumerate (msg_long_list ))
983- raise OMCSessionException (f"OMC error occurred for 'sendExpression({ command } , { parsed } ):\n "
983+ raise OMCSessionException (f"OMC error occurred for 'sendExpression({ expr } , { parsed } ):\n "
984984 f"{ msg_long_str } " )
985985
986986 if not parsed :
0 commit comments