@@ -82,18 +82,15 @@ def check_one_cloud(
82
82
cloud_repr , cloud = cloud_tuple
83
83
assert capabilities is not None
84
84
for capability in capabilities :
85
- not_supported = False
86
85
with rich_utils .safe_status (f'Checking { cloud_repr } ...' ):
87
86
try :
88
87
ok , reason = check_credentials (cloud , capability )
89
88
except exceptions .NotSupportedError :
90
- not_supported = True
89
+ continue
91
90
except Exception : # pylint: disable=broad-except
92
91
# Catch all exceptions to prevent a single cloud
93
92
# from blocking the check for other clouds.
94
93
ok , reason = False , traceback .format_exc ()
95
- if not_supported :
96
- continue
97
94
status_msg = ('enabled' if ok else 'disabled' )
98
95
styles = {'fg' : 'green' , 'bold' : False } if ok else {'dim' : True }
99
96
echo (' ' + click .style (f'{ cloud_repr } : { status_msg } ' , ** styles ) +
@@ -287,8 +284,8 @@ def get_cached_enabled_storage_clouds_or_refresh(
287
284
exceptions.NoCloudAccessError: if no public cloud is enabled and
288
285
raise_if_no_cloud_access is set to True.
289
286
"""
290
- cached_enabled_storage_clouds = \
291
- global_user_state .get_cached_enabled_storage_clouds ()
287
+ cached_enabled_storage_clouds = (
288
+ global_user_state .get_cached_enabled_storage_clouds ())
292
289
if not cached_enabled_storage_clouds :
293
290
try :
294
291
check (quiet = True , capability = CloudCapability .STORAGE )
@@ -297,8 +294,8 @@ def get_cached_enabled_storage_clouds_or_refresh(
297
294
# Here we catch it and raise the exception later only if
298
295
# raise_if_no_cloud_access is set to True.
299
296
pass
300
- cached_enabled_storage_clouds = \
301
- global_user_state .get_cached_enabled_storage_clouds ()
297
+ cached_enabled_storage_clouds = (
298
+ global_user_state .get_cached_enabled_storage_clouds ())
302
299
if raise_if_no_cloud_access and not cached_enabled_storage_clouds :
303
300
with ux_utils .print_exception_no_traceback ():
304
301
raise exceptions .NoCloudAccessError (
0 commit comments