Skip to content

Commit

Permalink
Avoid eval() (certbot#3844)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaszbz authored and TheNavigat committed Feb 1, 2017
1 parent 30c57b7 commit 8488afe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions certbot/renewal.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,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))
Expand Down

0 comments on commit 8488afe

Please sign in to comment.