Skip to content

Commit 04ccf1d

Browse files
committed
[ModelicaSystemCmd.run()] use repr(cmdl) in log messages / exceptions
1 parent 1880049 commit 04ccf1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OMPython/ModelicaSystem.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,14 @@ def run(self) -> int:
253253
stderr = cmdres.stderr.strip()
254254
returncode = cmdres.returncode
255255

256-
logger.debug("OM output for command %s:\n%s", cmdl, stdout)
256+
logger.debug("OM output for command %s:\n%s", repr(cmdl), stdout)
257257

258258
if stderr:
259-
raise ModelicaSystemError(f"Error running command {cmdl}: {stderr}")
259+
raise ModelicaSystemError(f"Error running command {repr(cmdl)}: {stderr}")
260260
except subprocess.TimeoutExpired:
261261
raise ModelicaSystemError(f"Timeout running command {repr(cmdl)}")
262262
except Exception as ex:
263-
raise ModelicaSystemError(f"Error running command {cmdl}") from ex
263+
raise ModelicaSystemError(f"Error running command {repr(cmdl)}") from ex
264264

265265
return returncode
266266

0 commit comments

Comments
 (0)