Skip to content

Commit

Permalink
ResolvedContext.get_resolved_package() should return None for failure
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Pelykh <alexey.pelykh@gmail.com>
  • Loading branch information
alexey-pelykh committed Jun 15, 2022
1 parent ad12105 commit 96dd363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rez/resolved_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def get_resolved_package(self, name):
"""Returns a `Variant` object or None if the package is not in the
resolve.
"""
pkgs = [x for x in self._resolved_packages if x.name == name]
pkgs = [x for x in (self._resolved_packages or []) if x.name == name]
return pkgs[0] if pkgs else None

def copy(self):
Expand Down

0 comments on commit 96dd363

Please sign in to comment.