~hopem/charms/trusty/neutron-openvswitch/ensure-tmpdir-cleanup

« back to all changes in this revision

Viewing changes to tests/charmhelpers/contrib/amulet/utils.py

  • Committer: Liam Young
  • Date: 2015-04-23 14:56:34 UTC
  • Revision ID: liam.young@canonical.com-20150423145634-5m0srvwjo70dao1z
Tags: 15.04
[gnuoy,trivial] Pre-release charmhelper sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
    def _get_config(self, unit, filename):
90
90
        """Get a ConfigParser object for parsing a unit's config file."""
91
91
        file_contents = unit.file_contents(filename)
92
 
        config = ConfigParser.ConfigParser()
 
92
 
 
93
        # NOTE(beisner):  by default, ConfigParser does not handle options
 
94
        # with no value, such as the flags used in the mysql my.cnf file.
 
95
        # https://bugs.python.org/issue7005
 
96
        config = ConfigParser.ConfigParser(allow_no_value=True)
93
97
        config.readfp(io.StringIO(file_contents))
94
98
        return config
95
99