Move download all setting to config.py
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import html
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
from pathlib import Path
|
||||
@@ -370,7 +369,7 @@ def download_all_invoices() -> list[Path]:
|
||||
years = get_year_options(page)
|
||||
if not years:
|
||||
raise RuntimeError("No years found on billing page.")
|
||||
download_all_years = os.getenv("DOWNLOAD_ALL_YEARS", "").lower() in ("1", "true", "yes", "y")
|
||||
download_all_years = Config.DOWNLOAD_ALL_YEARS
|
||||
if not download_all_years:
|
||||
years = [years[0]]
|
||||
logger.info("Group '%s' - years: %s", group["label"], years)
|
||||
|
||||
Reference in New Issue
Block a user