diff --git a/simbelmyne.py b/simbelmyne.py index 3ef9a3f..effb375 100644 --- a/simbelmyne.py +++ b/simbelmyne.py @@ -22,7 +22,8 @@ def main_simbelmyne(parsed_args): if parsed_args.verbose < 2: subprocess.Popen(command_args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) # Use Popen instead of run to be able to display the progress bar - progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose, leave=False) + if not main_dict["mode"] in ["pre_sCOLA", "post_sCOLA", "allsCOLA"]: # No progress bar for pre/post sCOLA + progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose, leave=False) else: subprocess.run(command_args) @@ -56,7 +57,7 @@ def main_simbelmyne(parsed_args): if isfile(log_file): # Remove the preexisting log file to allow for the progress_bar to be run normally from os import remove - oremove(log_file) + remove(log_file) if parsed_args.verbose < 2: subprocess.run(command_args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) @@ -64,7 +65,8 @@ def main_simbelmyne(parsed_args): subprocess.run(command_args) print_message("Simbelmyne job submitted.", 2, "simbelmyne", verbose=parsed_args.verbose) - progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose) + if not main_dict["mode"] in ["pre_sCOLA", "post_sCOLA", "allsCOLA"]: # No progress bar for pre/post sCOLA + progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose) else: raise ValueError(f"Execution mode {parsed_args.execution} not recognized.")