Mercurial > silorider
view silorider/commands/auth.py @ 41:1db1890edcf5
Change populate command's 'until' argument to be exclusive and support time
The argument can now specify a time within the day, but this forces the
argument to now be exclusive. So if only a date is provided (no time),
you need to enter the next day, i.e. the first day to *not* be included.
This makes the argument effectively exclusive.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 20 Aug 2023 11:14:31 -0700 |
parents | a1b7a459326a |
children |
line wrap: on
line source
import logging from ..silos.base import SiloAuthenticationContext logger = logging.getLogger(__name__) def auth_silo(ctx): silo_names = ctx.args.silo if 'all' in silo_names: silo_names = [s.name for s in ctx.silos] for silo in ctx.silos: if silo.name not in silo_names: continue logger.debug("Authenticating silo: %s" % silo.name) authctx = SiloAuthenticationContext(ctx) silo.authenticate(authctx)