mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Avoid eval() (#3844)
This commit is contained in:
parent
7767f62a2e
commit
823cba55e3
1 changed files with 1 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue