diff --git a/zunclient/common/cliutils.py b/zunclient/common/cliutils.py index a7d7a83d..51c0de60 100644 --- a/zunclient/common/cliutils.py +++ b/zunclient/common/cliutils.py @@ -216,6 +216,8 @@ def print_dict(dct, dict_property="Property", wrap=0): v = six.text_type(keys_and_vals_to_strs(v)) if wrap > 0: v = textwrap.fill(six.text_type(v), wrap) + elif wrap < 0: + raise ValueError(_("Wrap argument should be a positive integer")) # if value has a newline, add in multiple rows # e.g. fault with stacktrace if v and isinstance(v, six.string_types) and r'\n' in v: