Skip to content

Commit

Permalink
Quick error handling fix (#3447)
Browse files Browse the repository at this point in the history
syntax fix
  • Loading branch information
landscapepainter authored Apr 18, 2024
1 parent c9f575c commit 20493fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sky/clouds/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def get_image_size(cls, image_id: str, region: Optional[str]) -> float:
try:
image = compute_client.virtual_machine_images.get(
region, publisher, offer, sku, version)
except azure.exceptions().ResourceNotFoundError() as e:
except azure.exceptions().ResourceNotFoundError as e:
with ux_utils.print_exception_no_traceback():
raise ValueError(f'Image not found: {image_id}') from e
if image.os_disk_image is None:
Expand Down
2 changes: 1 addition & 1 deletion sky/provision/azure/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def open_ports(
with ux_utils.print_exception_no_traceback():
raise ValueError(f'Failed to open ports {ports} in NSG '
f'{nsg.name}: {poller.status()}')
except azure.exceptions().HttpResponseError() as e:
except azure.exceptions().HttpResponseError as e:
with ux_utils.print_exception_no_traceback():
raise ValueError(
f'Failed to open ports {ports} in NSG {nsg.name}.') from e
Expand Down

0 comments on commit 20493fb

Please sign in to comment.