def create_initial_config_file(args, extensions_data):
 config_file = args.config_files[(-1)]
 if os.path.exists(path.expand_path(config_file)):
  return
 try:
  default = config_lib.format_initial(extensions_data)
  path.get_or_create_file(config_file, mkdir=False, content=default)
  logger.info(u'Initialized %s with default config', config_file)
 except IOError as error:
  logger.warning(u'Unable to initialize %s with default config: %s', config_file, encoding.locale_decode(error))

def create_initial_config_file ( args , extensions_data ) : config_file = args . config_files [ ( - 1 ) ] if os . path . exists ( path . expand_path ( config_file ) ) : return try : default = config_lib . format_initial ( extensions_data ) path . get_or_create_file ( config_file , mkdir = False , content = default ) logger . info ( u'Initialized %s with default config' , config_file ) except IOError as error : logger . warning ( u'Unable to initialize %s with default config: %s' , config_file , encoding . locale_decode ( error ) )
initialize whatever the last config file is with defaults .