def _write_config(config, newlines=2):
 text = config
 if (isinstance(config, dict) and (len(list(list(config.keys()))) == 1)):
  key = next(six.iterkeys(config))
  text = config[key]
 try:
  with salt.utils.fopen(__SYSLOG_NG_CONFIG_FILE, 'a') as fha:
   fha.write(text)
   for _ in range(0, newlines):
    fha.write(os.linesep)
  return True
 except Exception as err:
  log.error(str(err))
  return False

def _write_config ( config , newlines = 2 ) : text = config if ( isinstance ( config , dict ) and ( len ( list ( list ( config . keys ( ) ) ) ) == 1 ) ) : key = next ( six . iterkeys ( config ) ) text = config [ key ] try : with salt . utils . fopen ( __SYSLOG_NG_CONFIG_FILE , 'a' ) as fha : fha . write ( text ) for _ in range ( 0 , newlines ) : fha . write ( os . linesep ) return True except Exception as err : log . error ( str ( err ) ) return False
writes /usbkey/config .