Skip to content
Snippets Groups Projects
Commit 7c95bb72 authored by Manuel Günther's avatar Manuel Günther
Browse files

Replaced eval() with more appropriate setattr() in resources

parent b9c8beb4
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ def read_config_file(filename, keyword = None): ...@@ -72,7 +72,7 @@ def read_config_file(filename, keyword = None):
if not hasattr(config, keyword): if not hasattr(config, keyword):
raise ImportError("The desired keyword '%s' does not exist in your configuration file '%s'." %(keyword, filename)) raise ImportError("The desired keyword '%s' does not exist in your configuration file '%s'." %(keyword, filename))
return eval('config.' + keyword) return getattr(config, keyword)
def _get_entry_points(keyword, strip = [], package_prefix='bob.bio.'): def _get_entry_points(keyword, strip = [], package_prefix='bob.bio.'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment