Increase yaml.dump width to 255 characters
Change-Id: I2479f86f038cb801bc3257afaa7b302c45a34ef5
diff --git a/reclass_tools/cli.py b/reclass_tools/cli.py
index 94d1e7a..cf718c8 100644
--- a/reclass_tools/cli.py
+++ b/reclass_tools/cli.py
@@ -66,7 +66,7 @@
results = walk_models.get_all_reclass_params(
self.params.path,
verbose=self.params.verbose)
- print(yaml.dump(results))
+ print(yaml.dump(results, width=255))
def do_list_domains(self):
try:
@@ -119,7 +119,8 @@
current_underlay_context = create_inventory.create_inventory_context(
domain=self.params.domain, keys=self.params.keys)
- print(yaml.dump(current_underlay_context, default_flow_style=False))
+ print(yaml.dump(current_underlay_context, default_flow_style=False,
+ width=255))
def do_render(self):
from reclass_tools import render
diff --git a/reclass_tools/reclass_models.py b/reclass_tools/reclass_models.py
index d05be5b..37f0bb6 100644
--- a/reclass_tools/reclass_models.py
+++ b/reclass_tools/reclass_models.py
@@ -96,7 +96,8 @@
out_dict = {}
helpers.create_nested_key(out_dict, ['parameters'] + self.track_key_path, key)
print(yaml.dump(out_dict,
- default_flow_style=False))
+ default_flow_style=False,
+ width=255))
# Reset the data collected by child entries
seen['__visited'] = orig_visited
@@ -118,7 +119,8 @@
out_dict = {}
helpers.create_nested_key(out_dict, ['parameters'] + self.track_key_path, key)
print(yaml.dump(out_dict,
- default_flow_style=False))
+ default_flow_style=False,
+ width=255))
return result
diff --git a/reclass_tools/render.py b/reclass_tools/render.py
index 285858f..9623dd6 100644
--- a/reclass_tools/render.py
+++ b/reclass_tools/render.py
@@ -33,7 +33,7 @@
:param env_name: name for new environment that will be created
"""
def toyaml(value, width=0, indentfirst=False):
- string = yaml.dump(value, default_flow_style=False)
+ string = yaml.dump(value, default_flow_style=False, width=255)
if string.splitlines():
return (
' ' * width * indentfirst +
@@ -72,7 +72,8 @@
except UndefinedVariableInTemplate as undefined_err:
context_str = yaml.dump(
undefined_err.context,
- default_flow_style=False
+ default_flow_style=False,
+ width=255
)
print('=' * 15 + ' Context: ' + '=' * 15 +
'\n{}'.format(context_str) + '='*40)
diff --git a/reclass_tools/walk_models.py b/reclass_tools/walk_models.py
index beeb27c..533a120 100644
--- a/reclass_tools/walk_models.py
+++ b/reclass_tools/walk_models.py
@@ -190,7 +190,7 @@
with open(fyml.fname, 'w') as f:
f.write(
yaml.dump(
- model, default_flow_style=False
+ model, default_flow_style=False, width=255
)
)
@@ -226,19 +226,22 @@
print("\n---\n# Found {0} in {1}"
.format('.'.join(remove_key), fyml.fname))
print(yaml.dump(nested_key,
- default_flow_style=False))
+ default_flow_style=False,
+ width=255))
else:
print("\n---\n# Removing {0} from {1}"
.format('.'.join(remove_key), fyml.fname))
print(yaml.dump(nested_key,
- default_flow_style=False))
+ default_flow_style=False,
+ width=255))
helpers.remove_nested_key(model, remove_key)
with open(fyml.fname, 'w') as f:
f.write(
yaml.dump(
- model, default_flow_style=False
+ model, default_flow_style=False,
+ width=255
)
)
# return found_keys