Skip to content
Snippets Groups Projects
Commit 630867cc authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[resources] Avoid exec() as it has bugs on Python 2.7

parent 9eb1e90c
Branches
Tags
1 merge request!36Suggests configuration file should be the default "way" with `verify.py`
Pipeline #
......@@ -84,7 +84,9 @@ def _collect_config(paths):
raise IOError("The configuration file, resource or module '%s' " \
"could not be found, loaded or imported" % paths[-1])
exec(compile(open(paths[-1], "rb").read(), paths[-1], 'exec'), retval.__dict__)
name = "".join(random.sample(ascii_letters, 10))
tmp = imp.load_source(name, paths[-1])
_attach_resources(tmp, retval)
return retval
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment