diff --git a/geoportal/c2cgeoportal_geoportal/scripts/__init__.py b/geoportal/c2cgeoportal_geoportal/scripts/__init__.py index 6c631fd25b..42c60fc363 100644 --- a/geoportal/c2cgeoportal_geoportal/scripts/__init__.py +++ b/geoportal/c2cgeoportal_geoportal/scripts/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2011-2023, Camptocamp SA +# Copyright (c) 2011-2024, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without @@ -38,12 +38,14 @@ from sqlalchemy.orm import Session, configure_mappers, sessionmaker -def fill_arguments(parser: ArgumentParser) -> None: +def fill_arguments(parser: ArgumentParser, use_attribute: bool = False) -> None: """Fill the command line argument description.""" default_config_uri = ( "c2c://development.ini" if os.path.isfile("development.ini") else "c2c://geoportal/development.ini" ) - c2cwsgiutils.setup_process.fill_arguments(parser, default_config_uri=default_config_uri) + c2cwsgiutils.setup_process.fill_arguments( + parser, default_config_uri=default_config_uri, use_attribute=use_attribute + ) def get_appsettings(options: Namespace) -> pyramid.config.Configurator: diff --git a/geoportal/c2cgeoportal_geoportal/scripts/urllogin.py b/geoportal/c2cgeoportal_geoportal/scripts/urllogin.py index a861456b79..bedf0e6153 100644 --- a/geoportal/c2cgeoportal_geoportal/scripts/urllogin.py +++ b/geoportal/c2cgeoportal_geoportal/scripts/urllogin.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023, Camptocamp SA +# Copyright (c) 2012-2024, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without @@ -58,7 +58,7 @@ def get_argparser() -> argparse.ArgumentParser: """Get the argument parser for this script.""" parser = argparse.ArgumentParser(description="Generate an auth token") - fill_arguments(parser) + fill_arguments(parser, use_attribute=True) parser.add_argument("user", help="The username") parser.add_argument("password", help="The password") parser.add_argument("valid", type=int, default=1, nargs="?", help="Is valid for, in days")