diff --git a/sushy/resources/registry/message_registry_file.py b/sushy/resources/registry/message_registry_file.py index a9325548..2e608cae 100644 --- a/sushy/resources/registry/message_registry_file.py +++ b/sushy/resources/registry/message_registry_file.py @@ -123,13 +123,13 @@ class MessageRegistryFile(base.ResourceBase): # language, in this case we can check if the registry language # starts with the requested language. locations = [ - l for l in self.location - if l.language.lower().split('-', 1)[0] == language - or l.language == language + loc for loc in self.location + if loc.language.lower().split('-', 1)[0] == language + or loc.language == language ] locations += [ - l for l in self.location if l.language.lower() == 'default'] + loc for loc in self.location if loc.language.lower() == 'default'] for location in locations: if location.uri: