summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2012-12-06 13:44:02 +0200
committerJoe Gordon <jogo@cloudscaling.com>2012-12-06 13:53:21 +0200
commitd8c4e0cd2652f37b68ffc689fc5ddef31f529379 (patch)
treea194209b07bb96f5e34130e46f5001747da3761f
parent255a27333092be0523949bd624c94b740515d018 (diff)
Change Exception MissingArgs's string
The error message in MissingArgs shows python names not the arg name the user will use in the CLI (see for example 'nova-manage flavor create') Change-Id: I544cede6ec60c8cde2438d1b378191271cec1aec
-rw-r--r--openstack/common/cliutils.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/openstack/common/cliutils.py b/openstack/common/cliutils.py
index 8f4dc44..89a6f62 100644
--- a/openstack/common/cliutils.py
+++ b/openstack/common/cliutils.py
@@ -15,7 +15,6 @@
# under the License.
import inspect
-import string
class MissingArgs(Exception):
@@ -25,12 +24,10 @@ class MissingArgs(Exception):
def __str__(self):
if len(self.missing) == 1:
- return ("An argument is missing: %(missing)s" %
- dict(missing=self.missing[0]))
+ return "An argument is missing"
else:
- return ("%(num)d arguments are missing: %(missing)s" %
- dict(num=len(self.missing),
- missing=string.join(self.missing, ', ')))
+ return ("%(num)d arguments are missing" %
+ dict(num=len(self.missing)))
def validate_args(fn, *args, **kwargs):