Commit a8cc5bd6 authored by Jason R. Coombs's avatar Jason R. Coombs

Don't allow imports relative to the pkg_resources module.

parent 5e22ed05
......@@ -2259,8 +2259,7 @@ class EntryPoint(object):
return self._load()
def _load(self):
module = __import__(self.module_name, globals(), globals(),
['__name__'])
module = __import__(self.module_name, fromlist=['__name__'], level=0)
try:
return functools.reduce(getattr, self.attrs, module)
except AttributeError as exc:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment