diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-12-06 23:40:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-12-06 23:40:47 +0000 |
| commit | 99b72e2d2b2fa9efa5e10083a7631c48f238bfd3 (patch) | |
| tree | 098132680e09bd525769d7ce9a2ac49a2048f64d | |
| parent | b67a752444be399bc0000069b2c60eee3ab94dad (diff) | |
| parent | d8c4e0cd2652f37b68ffc689fc5ddef31f529379 (diff) | |
| download | oslo-99b72e2d2b2fa9efa5e10083a7631c48f238bfd3.tar.gz oslo-99b72e2d2b2fa9efa5e10083a7631c48f238bfd3.tar.xz oslo-99b72e2d2b2fa9efa5e10083a7631c48f238bfd3.zip | |
Merge "Change Exception MissingArgs's string"
| -rw-r--r-- | openstack/common/cliutils.py | 9 |
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): |
