Skip to content

Commit 1517ac6

Browse files
Check for empty deployments (#365)
1 parent 59edcc6 commit 1517ac6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gradient/cli/gradient_deployments.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def update_deployment_command(ctx, api_key, id, name, project_id, spec_path, clu
139139
def list_deployments_command(ctx, api_key):
140140
try:
141141
deployments = list_deployments()
142+
if len(deployments) == 0:
143+
print('No deployments found')
144+
return
142145
table_data = [('Name', 'ID')]
143146
for deployment in deployments:
144147
table_data.append((deployment['name'], deployment['id']))

0 commit comments

Comments
 (0)