Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't try to delete directories in cleanup step (#263)
fixes: > DEBUG:edi_energy_scraper.scraper:Removing /home/runner/work/edi_energy_mirror/edi_energy_mirror/edi_energy_de/FV2504 Traceback (most recent call last): File "/home/runner/work/edi_energy_mirror/edi_energy_mirror/download_and_post_process.py", line 16, in <module> loop.run_until_complete(mirror()) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/asyncio/base_events.py", line 720, in run_until_complete return future.result() ~~~~~~~~~~~~~^^ File "/home/runner/work/edi_energy_mirror/edi_energy_mirror/download_and_post_process.py", line 11, in mirror await scraper.mirror() File "/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/site-packages/edi_energy_scraper/scraper.py", line 112, in mirror self._remove_old_files(all_metadata) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/site-packages/edi_energy_scraper/scraper.py", line 61, in _remove_old_files downloaded_file.unlink() ~~~~~~~~~~~~~~~~~~~~~~^^ File "/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/pathlib/_local.py", line 746, in unlink os.unlink(self) ~~~~~~~~~^^^^^^ IsADirectoryError: [Errno 21] Is a directory: 'edi_energy_de/FV2504' Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de>
- Loading branch information