Skip to content

Commit

Permalink
supress all printing when quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Aug 21, 2024
1 parent 07432d2 commit 57086e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions harpy/_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

def launch_snakemake(sm_args, workflow, starttext, outdir, sm_logfile, quiet):
"""launch snakemake with the given commands"""
print_onstart(starttext, workflow.replace("_", " "))
if not quiet:
print_onstart(starttext, workflow.replace("_", " "))
try:
# Add a task with a total value of 100 (representing 100%)
# Start a subprocess
Expand Down Expand Up @@ -155,7 +156,8 @@ def launch_snakemake(sm_args, workflow, starttext, outdir, sm_logfile, quiet):
break

if process.returncode < 1:
print_onsuccess(outdir)
if not quiet:
print_onsuccess(outdir)
else:
print_onerror(sm_logfile)
with open(sm_logfile, "r", encoding="utf-8") as logfile:
Expand Down

0 comments on commit 57086e0

Please sign in to comment.