mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 12:21:51 +02:00
Try things the EvenMoreProper way
This commit is contained in:
+1
-7
@@ -864,12 +864,6 @@ def _renewal_conf_files(config):
|
|||||||
"""Return /path/to/*.conf in the renewal conf directory"""
|
"""Return /path/to/*.conf in the renewal conf directory"""
|
||||||
return glob.glob(os.path.join(config.renewal_configs_dir, "*.conf"))
|
return glob.glob(os.path.join(config.renewal_configs_dir, "*.conf"))
|
||||||
|
|
||||||
def _copy_nsconfig(config):
|
|
||||||
# Work around https://bugs.python.org/issue1515 for py26 tests :( :(
|
|
||||||
# https://travis-ci.org/letsencrypt/letsencrypt/jobs/106900743#L3276
|
|
||||||
ns = copy.deepcopy(config.namespace)
|
|
||||||
new_config = configuration.NamespaceConfig(ns)
|
|
||||||
return new_config
|
|
||||||
|
|
||||||
def renew(config, unused_plugins):
|
def renew(config, unused_plugins):
|
||||||
"""Renew previously-obtained certificates."""
|
"""Renew previously-obtained certificates."""
|
||||||
@@ -893,7 +887,7 @@ def renew(config, unused_plugins):
|
|||||||
print("Processing " + renewal_file)
|
print("Processing " + renewal_file)
|
||||||
# XXX: does this succeed in making a fully independent config object
|
# XXX: does this succeed in making a fully independent config object
|
||||||
# each time?
|
# each time?
|
||||||
lineage_config = _copy_nsconfig(config)
|
lineage_config = copy.deepcopy(config)
|
||||||
|
|
||||||
# Note that this modifies config (to add back the configuration
|
# Note that this modifies config (to add back the configuration
|
||||||
# elements from within the renewal configuration file).
|
# elements from within the renewal configuration file).
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
"""Let's Encrypt user-supplied configuration."""
|
"""Let's Encrypt user-supplied configuration."""
|
||||||
|
import copy
|
||||||
import os
|
import os
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
@@ -78,6 +79,12 @@ class NamespaceConfig(object):
|
|||||||
return os.path.join(
|
return os.path.join(
|
||||||
self.namespace.work_dir, constants.TEMP_CHECKPOINT_DIR)
|
self.namespace.work_dir, constants.TEMP_CHECKPOINT_DIR)
|
||||||
|
|
||||||
|
def __deepcopy__(self, _memo):
|
||||||
|
# Work around https://bugs.python.org/issue1515 for py26 tests :( :(
|
||||||
|
# https://travis-ci.org/letsencrypt/letsencrypt/jobs/106900743#L3276
|
||||||
|
new_ns = copy.deepcopy(self.namespace)
|
||||||
|
return type(self)(new_ns)
|
||||||
|
|
||||||
|
|
||||||
class RenewerConfiguration(object):
|
class RenewerConfiguration(object):
|
||||||
"""Configuration wrapper for renewer."""
|
"""Configuration wrapper for renewer."""
|
||||||
|
|||||||
Reference in New Issue
Block a user