Skip to content

Commit 650ed42

Browse files
committed
chore: reduce logging level of some errors
1 parent 5fc4003 commit 650ed42

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pyneuroml/runners.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ def execute_command_in_dir_with_realtime_output(
922922
raise e
923923

924924
if not p.returncode == 0:
925-
logger.critical(
925+
logger.error(
926926
"*** Problem running command (return code: %s): [%s]"
927927
% (p.returncode, command)
928928
)
@@ -993,14 +993,14 @@ def execute_command_in_dir(
993993
return return_string.decode("utf-8")
994994

995995
except subprocess.CalledProcessError as e:
996-
logger.critical("*** Problem running last command: %s" % e)
996+
logger.error("*** Problem running last command: %s" % e)
997997

998998
print("####################################################################")
999999
print("%s%s" % (prefix, e.output.decode().replace("\n", "\n" + prefix)))
10001000
print("####################################################################")
10011001
return (e.returncode, e.output.decode())
10021002
except Exception as e:
1003-
logger.critical("*** Unknown problem running command: %s" % e)
1003+
logger.error("*** Unknown problem running command: %s" % e)
10041004
return (-1, str(e))
10051005

10061006

pyneuroml/utils/jnmlwrapper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ def __jnmlwrapper():
3636
report_jnml_output=False,
3737
output_prefix="",
3838
return_string=True,
39-
exit_on_fail=True,
39+
exit_on_fail=False,
4040
)
4141

4242
# if command ran successfully, print the output
4343
# if it didn't, `run_jneuroml` will throw a critical error
4444
if retstat is True:
4545
print(output)
46+
sys.exit(0)
47+
else:
48+
sys.exit(1)

0 commit comments

Comments
 (0)