Skip to content

Commit cd7ffbc

Browse files
committed
Yield package before assigning to resource
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 6007301 commit cd7ffbc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/packagedcode/about.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,17 @@ def assemble(cls, package_data, resource, codebase, package_adder):
118118
package_data=package_data,
119119
datafile_path=datafile_path,
120120
)
121-
package_uid = package.package_uid
122-
123-
# NOTE: we do not attach files to the Package level. Instead we
124-
# update `for_package` in the file
125-
package_adder(package_uid, resource, codebase)
126121

127122
if not package.license_expression:
128123
package.license_expression = cls.compute_normalized_license(package)
129124

130125
yield package
131126

127+
package_uid = package.package_uid
128+
# NOTE: we do not attach files to the Package level. Instead we
129+
# update `for_package` in the file
130+
package_adder(package_uid, resource, codebase)
131+
132132
if resource.has_parent() and package_data.file_references:
133133
parent_resource = resource.parent(codebase)
134134
if parent_resource and package_data.file_references:

0 commit comments

Comments
 (0)