summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJas <singhj@us.ibm.com>2016-02-29 16:06:05 -0600
committerJas <singhj@us.ibm.com>2016-02-29 16:06:05 -0600
commitb8d72cee27dd81b5749c64945475ea8781cb5fdf (patch)
tree173c2cef6602fc6873d1a1db737b3ccefc56545a
parent5310cfb8b750b3a17b99d235318e736023cfd234 (diff)
downloadpython-openstackclient-b8d72cee27dd81b5749c64945475ea8781cb5fdf.tar.gz
fix: Exception message includes unnecessary class args
Fix misusages of ArgumentTypeError which causes a tuple of class instance and error message string to be printed rather than just the error message string itsself. Change-Id: I0e997f86bb6603930cc92e90efcb48155f62ffb5 Closes-bug: #1551426
-rw-r--r--openstackclient/common/parseractions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/common/parseractions.py b/openstackclient/common/parseractions.py
index 7d332a5f..c30058c8 100644
--- a/openstackclient/common/parseractions.py
+++ b/openstackclient/common/parseractions.py
@@ -89,7 +89,7 @@ class MultiKeyValueAction(argparse.Action):
else:
msg = ("Expected key=value pairs separated by comma, "
"but got: %s" % (str(kv)))
- raise argparse.ArgumentTypeError(self, msg)
+ raise argparse.ArgumentTypeError(msg)
# Check key validation
valid_keys = self.required_keys | self.optional_keys
@@ -160,4 +160,4 @@ class NonNegativeAction(argparse.Action):
setattr(namespace, self.dest, values)
except Exception:
msg = "%s expected a non-negative integer" % (str(option_string))
- raise argparse.ArgumentTypeError(self, msg)
+ raise argparse.ArgumentTypeError(msg)