Keep newlines when reading LXC container config file (#32219)

This commit is contained in:
Musee Ullah 2017-11-14 08:46:39 -08:00 committed by Matt Martz
parent afc460c943
commit 7318b7c0b0

View file

@ -723,7 +723,7 @@ class LxcContainerManagement(object):
container_config_file = self.container.config_file_name
with open(container_config_file, 'rb') as f:
container_config = to_text(f.read(), errors='surrogate_or_strict').splitlines()
container_config = to_text(f.read(), errors='surrogate_or_strict').splitlines(True)
# Note used ast literal_eval because AnsibleModule does not provide for
# adequate dictionary parsing.