Skip to content

Commit

Permalink
fix: bad output on bad input for cloud-only
Browse files Browse the repository at this point in the history
Fix to display a proper error message if cloud name is not input
correctly

closes: #296
Change-Id: Idce04459ae7da7b4a363d151043f64d126da2d00
grafuls committed Nov 1, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2c56255 commit 095601b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/quads-cli
Original file line number Diff line number Diff line change
@@ -500,6 +500,9 @@ def main(_args):

elif _args.cloudonly:
_cloud = Cloud.objects(name=_args.cloudonly).first()
if not _cloud:
logger.error("Cloud is not defined.")
exit(1)
_kwargs = {"cloud": _cloud}
if _args.datearg:
_kwargs["date"] = datetime.datetime.strptime(_args.datearg, '%Y-%m-%d %H:%M').isoformat()

0 comments on commit 095601b

Please sign in to comment.