diff --git a/sky/clouds/azure.py b/sky/clouds/azure.py index a0e16c83471..4f5142ee77e 100644 --- a/sky/clouds/azure.py +++ b/sky/clouds/azure.py @@ -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: diff --git a/sky/provision/azure/instance.py b/sky/provision/azure/instance.py index 3264f3e9350..dc7b23dee5c 100644 --- a/sky/provision/azure/instance.py +++ b/sky/provision/azure/instance.py @@ -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