Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Javagedes committed Jan 30, 2024
1 parent f0184c1 commit 256dcba
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions edk2toollib/database/tables/instanced_inf_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ def _parse_inf_recursively(
library_instance_list.append(null_lib)
library_class_list.append("NULL")

for null_lib in self._get_null_lib_instances(inf, scope, library_dict):
for null_lib in self._get_null_lib_instances(scope, library_dict):
if null_lib == inf:
continue
library_instance_list.append(null_lib)
library_class_list.append("NULL")

Expand Down Expand Up @@ -362,14 +364,12 @@ def _reduce_lib_instances(self, module: str, library_instance_list: list[str]) -

def _get_null_lib_instances(
self,
inf: str,
scope: str,
library_dict: dict,
) -> list:
"""Returns all null libraries for a given scope.
Args:
inf (str): The INF file to ignore null libraries for.
scope (str): The scope to search for null libraries.
library_dict (dict): The dictionary of libraries to search through.
Expand All @@ -391,7 +391,4 @@ def _get_null_lib_instances(
lookup = 'common.null'
null_libs.extend(library_dict.get(lookup, []))

if inf in null_libs:
null_libs.remove(inf)

return null_libs

0 comments on commit 256dcba

Please sign in to comment.