From 96dd36370c8026c08ff49ce0bae160f219f14bab Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Wed, 15 Jun 2022 07:19:56 +0200 Subject: [PATCH] ResolvedContext.get_resolved_package() should return None for failure Signed-off-by: Alexey Pelykh --- src/rez/resolved_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rez/resolved_context.py b/src/rez/resolved_context.py index 3bd74498f..7da730cc5 100644 --- a/src/rez/resolved_context.py +++ b/src/rez/resolved_context.py @@ -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):