From 5852515ddfd0990ab3c1ed8f99235565ef1bd575 Mon Sep 17 00:00:00 2001 From: Egor Sklyarov Date: Fri, 27 Oct 2023 13:06:30 +0400 Subject: [PATCH] Handle provider as a string --- src/gpuhunt/_internal/catalog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpuhunt/_internal/catalog.py b/src/gpuhunt/_internal/catalog.py index 8da6d1d..4fd446e 100644 --- a/src/gpuhunt/_internal/catalog.py +++ b/src/gpuhunt/_internal/catalog.py @@ -113,9 +113,9 @@ def query( if self.fill_missing: query_filter = constraints.fill_missing(query_filter) # validate providers - if provider is not None: - provider = [p.lower() for p in provider] - for p in provider: + if query_filter.provider is not None: + query_filter.provider = [p.lower() for p in query_filter.provider] + for p in query_filter.provider: if p not in OFFLINE_PROVIDERS + ONLINE_PROVIDERS: raise ValueError(f"Unknown provider: {p}")