Skip to content

Commit

Permalink
[Azure] Fix empty string for status query (#3015)
Browse files Browse the repository at this point in the history
* Fix empty status for Azure

* Add comment
  • Loading branch information
Michaelvll authored Jan 25, 2024
1 parent 47206ac commit 02106c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sky/clouds/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ def query_status(cls, name: str, tag_filters: Dict[str, str],
assert stdout.strip(), f'No status returned for {name!r}'

original_statuses_list = json.loads(stdout.strip())
if not original_statuses_list:
# No nodes found. The original_statuses_list will be empty string.
# Return empty list.
return []
if not isinstance(original_statuses_list, list):
original_statuses_list = [original_statuses_list]
statuses = []
Expand Down

0 comments on commit 02106c1

Please sign in to comment.