mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 08:08:00 +02:00
Less delimitation
This commit is contained in:
+11
-7
@@ -203,19 +203,15 @@ def should_renew(config, lineage):
|
|||||||
|
|
||||||
|
|
||||||
def report(msgs, category):
|
def report(msgs, category):
|
||||||
"Report results for a category of renewal outcomes"
|
"Format a results report for a category of renewal outcomes"
|
||||||
lines = ("%s (%s)" % (m, category) for m in msgs)
|
lines = ("%s (%s)" % (m, category) for m in msgs)
|
||||||
return " " + "\n ".join(lines)
|
return " " + "\n ".join(lines)
|
||||||
|
|
||||||
def _renew_describe_results(config, renew_successes, renew_failures,
|
def _renew_describe_results(config, renew_successes, renew_failures,
|
||||||
renew_skipped, parse_failures):
|
renew_skipped, parse_failures):
|
||||||
if config.quiet and (renew_failures or parse_failures):
|
|
||||||
# In case of errors, spin up a new non-quiet output display
|
|
||||||
dest = display_util.NoninteractiveDisplay(sys.stdout)
|
|
||||||
else:
|
|
||||||
dest = zope.component.getUtility(interfaces.IDisplay)
|
|
||||||
|
|
||||||
notify = lambda msg: dest.notification(msg, pause=False)
|
out = []
|
||||||
|
notify = out.append
|
||||||
|
|
||||||
if config.dry_run:
|
if config.dry_run:
|
||||||
notify("** DRY RUN: simulating 'letsencrypt renew' close to cert expiry")
|
notify("** DRY RUN: simulating 'letsencrypt renew' close to cert expiry")
|
||||||
@@ -249,6 +245,14 @@ def _renew_describe_results(config, renew_successes, renew_failures,
|
|||||||
notify("** DRY RUN: simulating 'letsencrypt renew' close to cert expiry")
|
notify("** DRY RUN: simulating 'letsencrypt renew' close to cert expiry")
|
||||||
notify("** (The test certificates above have not been saved.)")
|
notify("** (The test certificates above have not been saved.)")
|
||||||
|
|
||||||
|
if config.quiet and (renew_failures or parse_failures):
|
||||||
|
# In case of errors, spin up a new non-quiet output display
|
||||||
|
dest = display_util.NoninteractiveDisplay(sys.stdout)
|
||||||
|
else:
|
||||||
|
dest = zope.component.getUtility(interfaces.IDisplay)
|
||||||
|
|
||||||
|
dest.notification("\n".join(out), pause=False)
|
||||||
|
|
||||||
|
|
||||||
def renew_all_lineages(config):
|
def renew_all_lineages(config):
|
||||||
"""Examine each lineage; renew if due and report results"""
|
"""Examine each lineage; renew if due and report results"""
|
||||||
|
|||||||
Reference in New Issue
Block a user