Skip to content
Snippets Groups Projects
Commit 00d31f79 authored by Paweł Szostek's avatar Paweł Szostek
Browse files

dep_solver: slightly clear the code

parent 9cd290e5
Branches
Tags
No related merge requests found
...@@ -53,9 +53,8 @@ class DependencySolver: ...@@ -53,9 +53,8 @@ class DependencySolver:
def __find_provider_vhdl_file(self, files, req): def __find_provider_vhdl_file(self, files, req):
for f in files: for f in files:
if f.dep_provides: if req in f.dep_provides:
if req in f.dep_provides: return f
return f
return None return None
...@@ -136,8 +135,7 @@ class DependencySolver: ...@@ -136,8 +135,7 @@ class DependencySolver:
for req in f.dep_requires: for req in f.dep_requires:
pf = self.__find_provider_vhdl_file([file for file in fset if isinstance(file, VHDLFile)], req) pf = self.__find_provider_vhdl_file([file for file in fset if isinstance(file, VHDLFile)], req)
if not pf: if not pf:
p.rawprint("Missing dependency in file "+str(f)+": " + req[0]+'.'+req[1]) p.rawprint("ERROR: Missing dependency in file "+str(f)+": " + req[0]+'.'+req[1])
quit()
else: else:
p.vprint("--> " + pf.path); p.vprint("--> " + pf.path);
if pf.path != f.path: if pf.path != f.path:
......
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