def should_renew(config, lineage):
 if config.renew_by_default:
  logger.debug('Auto-renewal forced with --force-renewal...')
  return True
 if lineage.should_autorenew(interactive=True):
  logger.info('Cert is due for renewal, auto-renewing...')
  return True
 if config.dry_run:
  logger.info('Cert not due for renewal, but simulating renewal for dry run')
  return True
 logger.info('Cert not yet due for renewal')
 return False

def should_renew ( config , lineage ) : if config . renew_by_default : logger . debug ( 'Auto-renewal forced with --force-renewal...' ) return True if lineage . should_autorenew ( interactive = True ) : logger . info ( 'Cert is due for renewal, auto-renewing...' ) return True if config . dry_run : logger . info ( 'Cert not due for renewal, but simulating renewal for dry run' ) return True logger . info ( 'Cert not yet due for renewal' ) return False
return true if any of the circumstances for automatic renewal apply .