From ca23023d779848dc68160d5ab1fa8d5eeca35b78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 31 Dec 2014 11:59:36 -0500 Subject: Return value directly --- pkg_resources/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg_resources') diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f3f7bcc9..f8f84a5f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2259,10 +2259,9 @@ class EntryPoint(object): entry = __import__(self.module_name, globals(), globals(), ['__name__']) try: - entry = functools.reduce(getattr, self.attrs, entry) + return functools.reduce(getattr, self.attrs, entry) except AttributeError as exc: raise ImportError(str(exc)) - return entry def require(self, env=None, installer=None): if self.extras and not self.dist: -- cgit v1.2.1