From 6952ecbec52684c0584823bc5442ae30564eb6da Mon Sep 17 00:00:00 2001 From: "sonu.kumar" Date: Fri, 11 Sep 2015 11:40:26 +0530 Subject: [PATCH] Added appropriate error message for designate cli This patch adds appropriate error message for Exception generated when running cli without authentication and endpoint. Change-Id: I78fe2f8db9a2cfa716c0071a7da404817dd5fbdd Closes-Bug: #1490843 --- designateclient/cli/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designateclient/cli/base.py b/designateclient/cli/base.py index 890850a1..356445f6 100644 --- a/designateclient/cli/base.py +++ b/designateclient/cli/base.py @@ -52,7 +52,10 @@ class Command(CliffCommand): self.error_output(parsed_args, columns, values) except ks_exceptions.EndpointNotFound as e: - self.app.log.error("No endpoint was found: %s", e.message) + self.app.log.error('No endpoint was found. You must provide a' + 'username or user id via --os-username, ' + '--os-user-id, env[OS_USERNAME] or ' + 'env[OS_USER_ID]') return 1