Simplified control flow.
@@ -2007,9 +2007,6 @@ class Interpreter(InterpreterBase):
raise DependencyException(m.format(name))
dep = cached_dep
else:
- # We need to actually search for this dep
- exception = None
- dep = None
# If the dependency has already been configured, possibly by
# a higher level project, try to use it first.
if 'fallback' in kwargs:
@@ -2022,8 +2019,11 @@ class Interpreter(InterpreterBase):
except KeyError:
pass
+ # We need to actually search for this dep
+ exception = None
+ dep = None
+
# Search for it outside the project
- if not dep:
try:
dep = dependencies.find_external_dependency(name, self.environment, kwargs)
except DependencyException as e:
