create inputs directory if it doesn't exist
All checks were successful
Publish to PyPI / Publish to PyPI (push) Successful in 1m11s

This commit is contained in:
Stefan Harmuth 2023-11-12 19:12:29 +01:00
parent 034c010635
commit 0daa028368

View File

@ -90,6 +90,9 @@ class AOCDay:
self.run_part(1, verbose, measure_runtime, timeit_number)
def _load_input(self, filename):
if not os.path.exists(INPUTS_PATH):
os.mkdir(INPUTS_PATH)
file_path = os.path.join(INPUTS_PATH, filename)
if not os.path.exists(file_path):
self._download_input(file_path)