Catch IndexError when getting dir creation date
Compare changes
+ 1
− 1
@@ -273,7 +273,7 @@ def get_dir_creation_date(directory: str, run: int,
Index error means that there are no files in the directory. We catch this error, as we want get_dir_creation_date
to raise only a ValueError
, which highlights better that the provided run is incorrect.
Previous changes broke the tests.
pytest -vv tests/test_cal_tools.py