diff options
-rw-r--r-- | fietsboek/scripts/__init__.py | 1 | ||||
-rw-r--r-- | fietsboek/scripts/fietscron.py | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/fietsboek/scripts/__init__.py b/fietsboek/scripts/__init__.py index ea36d96..c7bbe98 100644 --- a/fietsboek/scripts/__init__.py +++ b/fietsboek/scripts/__init__.py @@ -12,6 +12,7 @@ config_option = click.option( "--config", type=click.Path(exists=True, dir_okay=False), required=True, + default="fietsboek.ini", help="Path to the Fietsboek configuration file", ) diff --git a/fietsboek/scripts/fietscron.py b/fietsboek/scripts/fietscron.py index a142f39..6a8f293 100644 --- a/fietsboek/scripts/fietscron.py +++ b/fietsboek/scripts/fietscron.py @@ -9,6 +9,7 @@ from sqlalchemy import create_engine, delete, exists, not_, select from sqlalchemy.engine import Engine from sqlalchemy.orm import Session +from . import config_option from .. import config as mod_config from .. import models from ..data import DataManager @@ -17,13 +18,7 @@ LOGGER = logging.getLogger(__name__) @click.command() -@click.option( - "-c", - "--config", - type=click.Path(exists=True, dir_okay=False), - required=True, - help="Path to the Fietsboek configuration file", -) +@config_option def cli(config): """Runs regular maintenance operations on the instance. |