Skip to content

Commit bf14037

Browse files
authored
Fixing help message and improving error handling in regen_derived command
1 parent 1fa2859 commit bf14037

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cloudinary_cli/modules/regen_derived.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010

1111
@command("regen_derived",
12-
short_help="""Regenerate all derived assets pertaining \
13-
to a named transformation, or transformation string.""",
12+
short_help="""Regenerate all derived assets pertaining to a named transformation, or transformation string.""",
1413
help="""
1514
\b
1615
Regenerate all derived assets pertaining to a specific named transformation, or transformation string.
@@ -25,7 +24,7 @@
2524
@option("-A", "--auto_paginate", is_flag=True, default=False,
2625
help="Auto-paginate Admin API calls.")
2726
@option("-F", "--force", is_flag=True,
28-
help="Skip initial and auto-paginate confirmation.")
27+
help="Skip confirmation.")
2928
@option("-n", "--max_results", nargs=1, default=10,
3029
help="""The maximum number of results to return.
3130
Default: 10, maximum: 500.""")
@@ -63,6 +62,9 @@ def regen_derived(trans_str, eager_notification_url,
6362
api_name="admin",
6463
auto_paginate=auto_paginate,
6564
force=force, return_data=True)
65+
if trans_details is False:
66+
return False
67+
6668
derived_resources = trans_details.get('derived')
6769
if not derived_resources:
6870
logger.info("No derived assets are using this transformation.")

0 commit comments

Comments
 (0)