From e1f7943f1e486534cab67005525eb125a8d8f5e6 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Fri, 4 Nov 2011 16:04:51 +0000 Subject: [PATCH] clarify error typeout svn: r18401 --- src/cli/plug/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cli/plug/__init__.py b/src/cli/plug/__init__.py index 1a3f1c25c..24451842a 100644 --- a/src/cli/plug/__init__.py +++ b/src/cli/plug/__init__.py @@ -88,14 +88,14 @@ def _convert_str_to_match_type(str_val, type_val): if str_val.isdigit(): return int(str_val) else: - print "%s is not an integer number" % str_val + print "'%s' is not an integer number" % str_val return 0 elif ret_type == float: try: return float(str_val) except ValueError: - print "%s is not a decimal number" % str_val + print "'%s' is not a decimal number" % str_val return 0.0 elif ret_type == bool: @@ -104,13 +104,13 @@ def _convert_str_to_match_type(str_val, type_val): elif str_val == str(False): return False else: - print "%s is not a boolean-- try 'True' or 'False'" % str_val + print "'%s' is not a boolean-- try 'True' or 'False'" % str_val return False elif ret_type == list: ret_val = [] if not ( str_val.startswith("[") and str_val.endswith("]") ): - print "%s is not a list-- try: [%s]" % (str_val, str_val) + print "'%s' is not a list-- try: [%s]" % (str_val, str_val) return ret_val entry = "" @@ -526,7 +526,7 @@ class CommandLineReport(object): else: #there was a show option given, but the option is invalid - print ("option %s not valid. Use 'show=all' to see all valid " + print ("option '%s' not valid. Use 'show=all' to see all valid " "options." % self.show) #------------------------------------------------------------------------