def save_sections(sections):
 default_section = sections['default']
 try:
  if bool(default_section.get('save', 'false')):
   conf_writer = ConfWriter(str(default_section.get('config', Constants.default_coafile)))
  else:
   return
 except ValueError:
  conf_writer = ConfWriter(str(default_section.get('save', '.coafile')))
 conf_writer.write_sections(sections)
 conf_writer.close()

def save_sections ( sections ) : default_section = sections [ 'default' ] try : if bool ( default_section . get ( 'save' , 'false' ) ) : conf_writer = ConfWriter ( str ( default_section . get ( 'config' , Constants . default_coafile ) ) ) else : return except ValueError : conf_writer = ConfWriter ( str ( default_section . get ( 'save' , '.coafile' ) ) ) conf_writer . write_sections ( sections ) conf_writer . close ( )
saves the given sections if they are to be saved .