Skip to content

Commit

Permalink
add a way to show error or warning during dcm2niix execution
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore committed Jun 18, 2024
1 parent 4532d44 commit 9ae71ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dcm2bids/dcm2niix_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ def execute(self):
shutil.rmtree(self.rm_tmp_dir)
self.logger.info("Temporary dicom directory removed.")

self.logger.debug(f"\n{output}")
if "Warning" in output or "Error" in output:
self.logger.info(f"\n{output}")
else:
self.logger.debug(f"\n{output}")

self.logger.info("Check log file for dcm2niix output\n")

else:
Expand Down

0 comments on commit 9ae71ff

Please sign in to comment.