Skip to content

Commit

Permalink
Merge pull request psipred#6 from isthisthat/fix_broken_pipe
Browse files Browse the repository at this point in the history
catch broken pipe exception and continue
  • Loading branch information
limitloss authored Jul 24, 2024
2 parents 127ce36 + a7e3f8b commit 5bc16ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ def format_horiz(data, ss, ss_conf):
suffix = '.horiz'

if not args_dict['silent']:
for line in lines: print(line)
try:
for line in lines: print(line)
except BrokenPipeError:
pass
else:
if not args_dict['save_files']:
raise ValueError('Using --silent and not using --save-files will lead to no output.')
Expand Down

0 comments on commit 5bc16ee

Please sign in to comment.