Fixes
1) use compat versions of ConfigParser and StringIO
2) fix sort list of XML Elements
3) open file needs to be opened in binary mode as write_pretty_xml
routing uses BytesIO() object.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
return section_name
def write_xml(self, filename):
- with open(filename, 'w') as f:
+ with open(filename, 'wb') as f:
root = Element('IniFile')
for sec_ini in self.ini_conf.sections():