From: Zack Cerza Date: Fri, 7 Feb 2014 20:05:08 +0000 (-0600) Subject: get_file() returns a str, not a StringIO... X-Git-Tag: 1.1.0~1646^2~33 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=69beebc935fe41aba4986bfd5bf0655d71c8505a;p=teuthology.git get_file() returns a str, not a StringIO... Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/devstack.py b/teuthology/task/devstack.py index 35363ee887..da3c5a2993 100644 --- a/teuthology/task/devstack.py +++ b/teuthology/task/devstack.py @@ -165,7 +165,6 @@ def update_devstack_config_files(devstack_node, secret_uuid): section='DEFAULT'): parser = ConfigParser() parser.read_file(config_stream) - parser.update(update_dict) for (key, value) in update_dict.items(): parser.set(section, key, value) out_stream = StringIO() @@ -212,7 +211,8 @@ def update_devstack_config_files(devstack_node, secret_uuid): for update in updates: file_name = update['name'] options = update['options'] - config_stream = misc.get_file(devstack_node, file_name, sudo=True) + config_str = misc.get_file(devstack_node, file_name, sudo=True) + config_stream = StringIO(config_str) backup_config(devstack_node, file_name) new_config_stream = update_config(file_name, config_stream, options) misc.sudo_write_file(devstack_node, file_name, new_config_stream)