mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:52:02 +02:00
renewal: use early return for empty lineage server (#10392)
This allows outdenting most of the logic for _ari_renewal_time. Split from #10377.
This commit is contained in:
@@ -337,7 +337,11 @@ def _ari_renewal_time(config: configuration.NamespaceConfig,
|
||||
# conf, i.e. `lineage.server`
|
||||
#
|
||||
# Fixes https://github.com/certbot/certbot/issues/10339
|
||||
if lineage.server:
|
||||
if not lineage.server:
|
||||
renewal_conf_file = storage.renewal_filename_for_lineagename(config, lineage.lineagename)
|
||||
logger.warning("Skipping ARI check because %s has no 'server' field. This issue will not "
|
||||
"prevent certificate renewal", renewal_conf_file)
|
||||
return None
|
||||
try:
|
||||
# Creating a new ACME client makes a network request, so check if we have
|
||||
# one cached for this cert's server already
|
||||
@@ -356,10 +360,6 @@ def _ari_renewal_time(config: configuration.NamespaceConfig,
|
||||
"problem persists and you think it's a bug in Certbot, please open an "
|
||||
"issue at https://github.com/certbot/certbot/issues/new/choose.")
|
||||
logger.debug("Error while requesting ARI was:", exc_info=True)
|
||||
else:
|
||||
renewal_conf_file = storage.renewal_filename_for_lineagename(config, lineage.lineagename)
|
||||
logger.warning("Skipping ARI check because %s has no 'server' field. This issue will not "
|
||||
"prevent certificate renewal", renewal_conf_file)
|
||||
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user