mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Fix the things I broke
This commit is contained in:
@@ -734,13 +734,13 @@ def _restore_required_config_elements(full_path, config, renewalparams):
|
||||
# so we don't know if the original was NoneType or str!
|
||||
if value == "None":
|
||||
value = None
|
||||
config.namespace__setattr__(config_item, value)
|
||||
setattr(config.namespace, config_item, value)
|
||||
# int-valued items to add if they're present
|
||||
for config_item in INT_CONFIG_ITEMS:
|
||||
if config_item in renewalparams:
|
||||
try:
|
||||
value = int(renewalparams[config_item])
|
||||
config.namespace__setattr__(config_item, value)
|
||||
setattr(config.namespace, config_item, value)
|
||||
except ValueError:
|
||||
logger.warning("Renewal configuration file %s specifies "
|
||||
"a non-numeric value for %s. Skipping.",
|
||||
@@ -766,18 +766,17 @@ def _restore_plugin_configs(config, renewalparams):
|
||||
# trying to read the file called "None")
|
||||
# Should we omit the item entirely rather than setting
|
||||
# its value to None?
|
||||
config.namespace__setattr__(config_item, None)
|
||||
setattr(config.namespace, config_item, None)
|
||||
continue
|
||||
if config_item.startswith(plugin_prefix + "_"):
|
||||
for action in _parser.parser._actions: # pylint: disable=protected-access
|
||||
if action.type is not None and action.dest == config_item:
|
||||
config.namespace__setattr__(
|
||||
config_item,
|
||||
action.type(renewalparams[config_item]))
|
||||
setattr(config.namespace, config_item,
|
||||
action.type(renewalparams[config_item]))
|
||||
break
|
||||
else:
|
||||
config.namespace__setattr__(
|
||||
config_item, str(renewalparams[config_item]))
|
||||
setattr(config.namespace, config_item,
|
||||
str(renewalparams[config_item]))
|
||||
return True
|
||||
|
||||
|
||||
@@ -822,8 +821,7 @@ def _reconstitute(full_path, config):
|
||||
# configuration restoring logic is not able to correctly parse it
|
||||
# from the serialized form.
|
||||
if "webroot_map" in renewalparams:
|
||||
config.namespace__setattr__(
|
||||
"webroot_map", renewalparams["webroot_map"])
|
||||
setattr(config.namespace, "webroot_map", renewalparams["webroot_map"])
|
||||
|
||||
try:
|
||||
domains = [le_util.enforce_domain_sanity(x) for x in
|
||||
@@ -834,7 +832,7 @@ def _reconstitute(full_path, config):
|
||||
"invalid. Skipping.", full_path)
|
||||
return None
|
||||
|
||||
config.namespace__setattr__("domains", domains)
|
||||
setattr(config.namespace, "domains", domains)
|
||||
return renewal_candidate
|
||||
|
||||
|
||||
@@ -843,7 +841,7 @@ def _renewal_conf_files(config):
|
||||
return glob.glob(os.path.join(config.renewal_configs_dir, "*.conf"))
|
||||
|
||||
|
||||
def renew(cli_config, plugins):
|
||||
def renew(cli_config, unused_plugins):
|
||||
"""Renew previously-obtained certificates."""
|
||||
cli_config = configuration.RenewerConfiguration(cli_config)
|
||||
if cli_config.domains != []:
|
||||
|
||||
Reference in New Issue
Block a user