Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-4849:get_machine_names doesn't error if machine type doesn't exist #74

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions smsdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,12 +712,9 @@ def get_machine_types(self, source_type=None, *args, **kwargs):
mts = self.get_data_v1("machine_type_v1", "get_machine_types", *args, **kwargs)

if source_type is not None:
mts = mts[
np.logical_or(
mts["source_type"] == source_type,
mts["source_type_clean"] == source_type,
)
]
mts = mts[mts["source_type"] == source_type]
if "source_type_clean" in kwargs and kwargs["source_type_clean"] is not None:
mts = mts[mts["source_type_clean"] == kwargs["source_type_clean"]]
JMkrish marked this conversation as resolved.
Show resolved Hide resolved

return mts

Expand Down