Skip to content

Commit

Permalink
🐛 Fix offline resolve templates (#321)
Browse files Browse the repository at this point in the history
* Create list regardless of early access

* Remove check for kernel version 3
  • Loading branch information
mayankpatibandla authored Jan 31, 2024
1 parent 191b408 commit 4efc0c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pros/conductor/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ def resolve_templates(self, identifier: Union[str, BaseTemplate], allow_online:
else:
query = identifier
if allow_offline:
offline_results = list()

if self.use_early_access:
offline_results = list(filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.early_access_local_templates))
else:
offline_results = list(filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.local_templates))
offline_results.extend(filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.early_access_local_templates))

offline_results.extend(filter(lambda t: t.satisfies(query, kernel_version=kernel_version), self.local_templates))

if unique:
results.update(offline_results)
Expand All @@ -171,7 +173,7 @@ def resolve_templates(self, identifier: Union[str, BaseTemplate], allow_online:
logger(__name__).debug('Saving Conductor config after checking for remote updates')
self.save() # Save self since there may have been some updates from the depots

if len(results) == 0 and (kernel_version.split('.')[0] == '3' and not self.use_early_access):
if len(results) == 0 and not self.use_early_access:
raise dont_send(
InvalidTemplateException(f'{identifier.name} does not support kernel version {kernel_version}'))

Expand Down

0 comments on commit 4efc0c0

Please sign in to comment.