Skip to content

Commit

Permalink
Avoid glob.glob
Browse files Browse the repository at this point in the history
  • Loading branch information
pannarale committed Sep 25, 2024
1 parent 4c8c247 commit 8206f3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/pygrb/pycbc_pygrb_pp_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ def display_seg_plot(output_dir, segments_dir):

curr_dir = os.getcwd()
os.chdir(output_dir)
segments_plot_name = 'GRB' + \
wflow.cp.get('workflow', 'trigger-name') + '_segments.png'
segments_plot = \
_workflow.resolve_url_to_file(glob.glob(segments_dir +
'/*_segments.png')[0])
_workflow.resolve_url_to_file(os.path.join(args.segment_dir,
segments_plot_name))
segments_plot_path = segments_plot.storage_path
im = Image.open(segments_plot_path)
meta = PngImagePlugin.PngInfo()
Expand Down

0 comments on commit 8206f3a

Please sign in to comment.