mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 08:03:10 +02:00
Moving code outside of try block
This commit is contained in:
@@ -45,16 +45,16 @@ 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()
|
||||||
try:
|
|
||||||
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)
|
||||||
|
try:
|
||||||
authenticator = plugins[renewalparams["authenticator"]]
|
authenticator = plugins[renewalparams["authenticator"]]
|
||||||
authenticator = authenticator.init(config)
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# TODO: Notify user? (authenticator could not be found)
|
# TODO: Notify user? (authenticator could not be found)
|
||||||
return False
|
return False
|
||||||
|
authenticator = authenticator.init(config)
|
||||||
|
|
||||||
authenticator.prepare()
|
authenticator.prepare()
|
||||||
account = client.determine_account(config)
|
account = client.determine_account(config)
|
||||||
|
|||||||
Reference in New Issue
Block a user