mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 16:13:23 +02:00
handle legacy http01_port value
This commit is contained in:
+7
-2
@@ -806,12 +806,17 @@ def _restore_required_config_elements(config, renewalparams):
|
|||||||
# int-valued items to add if they're present
|
# int-valued items to add if they're present
|
||||||
for config_item in INT_CONFIG_ITEMS:
|
for config_item in INT_CONFIG_ITEMS:
|
||||||
if config_item in renewalparams and not _set_by_cli(config_item):
|
if config_item in renewalparams and not _set_by_cli(config_item):
|
||||||
|
config_value = renewalparams[config_item]
|
||||||
|
if config_item == "http01_port" and config_value == "None":
|
||||||
|
logger.info("updating legacy http01_port value")
|
||||||
|
int_value = flag_default("http01_port")
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
value = int(renewalparams[config_item])
|
int_value = int(config_value)
|
||||||
setattr(config.namespace, config_item, value)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise errors.Error(
|
raise errors.Error(
|
||||||
"Expected a numeric value for {0}".format(config_item))
|
"Expected a numeric value for {0}".format(config_item))
|
||||||
|
setattr(config.namespace, config_item, int_value)
|
||||||
|
|
||||||
|
|
||||||
def _restore_plugin_configs(config, renewalparams):
|
def _restore_plugin_configs(config, renewalparams):
|
||||||
|
|||||||
Reference in New Issue
Block a user