Private _AttrDict

This commit is contained in:
Jakub Warmuz
2015-05-28 18:09:05 +00:00
parent c813efdce7
commit 8d1135c049
+3 -3
View File
@@ -21,14 +21,14 @@ from letsencrypt import storage
from letsencrypt.plugins import disco as plugins_disco from letsencrypt.plugins import disco as plugins_disco
class AttrDict(dict): class _AttrDict(dict):
"""Attribute dictionary. """Attribute dictionary.
A trick to allow accessing dictionary keys as object attributes. A trick to allow accessing dictionary keys as object attributes.
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs) super(_AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self self.__dict__ = self
@@ -58,7 +58,7 @@ def renew(cert, old_version):
return False return False
# Instantiate the appropriate authenticator # Instantiate the appropriate authenticator
plugins = plugins_disco.PluginsRegistry.find_all() plugins = plugins_disco.PluginsRegistry.find_all()
config = configuration.NamespaceConfig(AttrDict(renewalparams)) config = configuration.NamespaceConfig(_AttrDict(renewalparams))
# XXX: this loses type data (for example, the fact that key_size # XXX: this loses type data (for example, the fact that key_size
# was an int, not a str) # was an int, not a str)
config.rsa_key_size = int(config.rsa_key_size) config.rsa_key_size = int(config.rsa_key_size)