Skip to content

Commit

Permalink
Guard access to AppleResourceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jparise committed Sep 27, 2021
1 parent e8431a1 commit c180639
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,14 @@ def _collect_bundle_imports(rule_attr):
return bundle_paths + unprocessed_bundle_resources

def _collect_unprocessed_resource_files(target):
obj = target
ari = obj[AppleResourceInfo]
resources = []
if not hasattr(ari, "unprocessed"):
return []
for info in ari.unprocessed:
for f in info[2].to_list():
resources.append(_file_metadata(f))
if AppleResourceInfo in target:
ari = target[AppleResourceInfo]
if not hasattr(ari, "unprocessed"):
return []
for info in ari.unprocessed:
for f in info[2].to_list():
resources.append(_file_metadata(f))
return resources

def _collect_framework_imports(rule_attr):
Expand Down

0 comments on commit c180639

Please # to comment.