def _write_exports(exports, edict):
 with salt.utils.fopen(exports, 'w') as efh:
  for export in edict:
   line = export
   for perms in edict[export]:
    hosts = ','.join(perms['hosts'])
    options = ','.join(perms['options'])
    line += ' {0}({1})'.format(hosts, options)
   efh.write('{0}\n'.format(line))

def _write_exports ( exports , edict ) : with salt . utils . fopen ( exports , 'w' ) as efh : for export in edict : line = export for perms in edict [ export ] : hosts = ',' . join ( perms [ 'hosts' ] ) options = ',' . join ( perms [ 'options' ] ) line += ' {0}({1})' . format ( hosts , options ) efh . write ( '{0}\n' . format ( line ) )
write an exports file to disk if multiple shares were initially configured per line .