mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Reorganize to make pylint happier
This commit is contained in:
+11
-10
@@ -884,9 +884,12 @@ def _renewal_conf_files(config):
|
|||||||
return glob.glob(os.path.join(config.renewal_configs_dir, "*.conf"))
|
return glob.glob(os.path.join(config.renewal_configs_dir, "*.conf"))
|
||||||
|
|
||||||
|
|
||||||
def _renew_describe_results(renew_successes, renew_failures, renew_skipped,
|
def _renew_describe_results(config, renew_successes, renew_failures,
|
||||||
parse_failures):
|
renew_skipped, parse_failures):
|
||||||
status = lambda x, msg: " " + "\n ".join(i + " (" + msg +")" for i in x)
|
status = lambda x, msg: " " + "\n ".join(i + " (" + msg +")" for i in x)
|
||||||
|
if config.dry_run:
|
||||||
|
print("** DRY RUN (messages below refer to test certs only!")
|
||||||
|
print("** The certificates mentioned have not been saved.")
|
||||||
print()
|
print()
|
||||||
if renew_skipped:
|
if renew_skipped:
|
||||||
print("The following certs are not due for renewal yet:")
|
print("The following certs are not due for renewal yet:")
|
||||||
@@ -912,6 +915,10 @@ def _renew_describe_results(renew_successes, renew_failures, renew_skipped,
|
|||||||
"were invalid: ")
|
"were invalid: ")
|
||||||
print(status(parse_failures, "parsefail"))
|
print(status(parse_failures, "parsefail"))
|
||||||
|
|
||||||
|
if config.dry_run:
|
||||||
|
print("** DRY RUN (messages above refer to test certs only!")
|
||||||
|
print("** The certificates mentioned have not been saved.")
|
||||||
|
|
||||||
|
|
||||||
def renew(config, unused_plugins):
|
def renew(config, unused_plugins):
|
||||||
"""Renew previously-obtained certificates."""
|
"""Renew previously-obtained certificates."""
|
||||||
@@ -980,14 +987,8 @@ def renew(config, unused_plugins):
|
|||||||
renew_failures.append(renewal_candidate.fullchain)
|
renew_failures.append(renewal_candidate.fullchain)
|
||||||
|
|
||||||
# Describe all the results
|
# Describe all the results
|
||||||
if config.dry_run:
|
_renew_describe_results(config, renew_successes, renew_failures,
|
||||||
print("** DRY RUN (messages below refer to test certs only!")
|
renew_skipped, parse_failures)
|
||||||
print("** The certificates mentioned have not been saved.")
|
|
||||||
_renew_describe_results(renew_successes, renew_failures, renew_skipped,
|
|
||||||
parse_failures)
|
|
||||||
if config.dry_run:
|
|
||||||
print("** DRY RUN (messages above refer to test certs only!")
|
|
||||||
print("** The certificates mentioned have not been saved.")
|
|
||||||
|
|
||||||
|
|
||||||
def revoke(config, unused_plugins): # TODO: coop with renewal config
|
def revoke(config, unused_plugins): # TODO: coop with renewal config
|
||||||
|
|||||||
Reference in New Issue
Block a user