mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:54:59 +02:00
Avoid eval() (#3844)
This commit is contained in:
+1
-3
@@ -196,9 +196,7 @@ def _restore_required_config_elements(config, renewalparams):
|
||||
if config_item in renewalparams and not cli.set_by_cli(config_item):
|
||||
config_value = renewalparams[config_item]
|
||||
if config_value in ("True", "False"):
|
||||
# bool("False") == True
|
||||
# pylint: disable=eval-used
|
||||
setattr(config.namespace, config_item, eval(config_value))
|
||||
setattr(config.namespace, config_item, (config_value == "True"))
|
||||
else:
|
||||
raise errors.Error(
|
||||
"Expected 'True' or 'False' for {0}".format(config_item))
|
||||
|
||||
Reference in New Issue
Block a user