Skip to content

Commit

Permalink
Check for empty deployments (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
paperspace-philip authored Sep 19, 2021
1 parent 59edcc6 commit 1517ac6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gradient/cli/gradient_deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def update_deployment_command(ctx, api_key, id, name, project_id, spec_path, clu
def list_deployments_command(ctx, api_key):
try:
deployments = list_deployments()
if len(deployments) == 0:
print('No deployments found')
return
table_data = [('Name', 'ID')]
for deployment in deployments:
table_data.append((deployment['name'], deployment['id']))
Expand Down

0 comments on commit 1517ac6

Please sign in to comment.