Fix `IndexError` raised when adding to existing webpage
The purpose of this MR is to fix a bug which caused an IndexError
to be raised when adding to an existing webpage. An example traceback showing the problem is shown below:
Traceback (most recent call last):
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/bin/summarypages", line 10, in <module>
sys.exit(main())
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/cli/summarypages.py", line 212, in main
WebpageGeneration(args, gw=gw_results_file(opts))
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/cli/summarypages.py", line 37, in __init__
self.generate_webpages()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/cli/summarypages.py", line 49, in generate_webpages
object.generate_webpages()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/cli/summarypages.py", line 145, in generate_webpages
self.webpage_object.generate_webpages()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/gw/webpage/main.py", line 222, in generate_webpages
super(_WebpageGeneration, self).generate_webpages()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/core/webpage/main.py", line 473, in generate_webpages
self.make_downloads_page()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/core/webpage/main.py", line 1349, in make_downloads_page
self._make_downloads_page(pages)
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/core/webpage/main.py", line 1418, in _make_downloads_page
html_file, i, num, base_string
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/gw/webpage/main.py", line 617, in _make_entry_in_downloads_table
html_file, label, num, base_string
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20210107/lib/python3.7/site-packages/pesummary/core/webpage/main.py", line 1450, in _make_entry_in_downloads_table
if self.config is not None and self.config[num] is not None:
IndexError: list index out of range