sxs-collaboration / sxs

Python code for manipulating data from the SXS collaboration
MIT License
25 stars 18 forks source link

Variable used before assigned in catalog.load() #72

Closed duetosymmetry closed 9 months ago

duetosymmetry commented 1 year ago

In catalog.py lines 66-104. Suppose the user passes download=False and the user has no cache (so not cache_path.exists()). Then line 99 will be hit, testing the value of download_failed, which was never assigned, because the if block starting on line 66 was never entered.

I think the test for download is False just needs to come before the test for download_failed to resolve.

Found by @akhairna.