From 429bf04ce448523a3f4bad4a3c60afd420a69cdf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 2 Feb 2017 20:11:25 +0100 Subject: migrator: Remove wrapper around envloadfile since envloadfile does the right thing in a compatible way --- tools/migration/prosody-migrator.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'tools/migration/prosody-migrator.lua') diff --git a/tools/migration/prosody-migrator.lua b/tools/migration/prosody-migrator.lua index b86e9892..8560ddb5 100644 --- a/tools/migration/prosody-migrator.lua +++ b/tools/migration/prosody-migrator.lua @@ -40,22 +40,13 @@ end local envloadfile = require "util.envload".envloadfile; --- Load config file -local function loadfilein(file, env) - if loadin then - return loadin(env, io.open(file):read("*a")); - else - return envloadfile(file, env); - end -end - local config_file = options.config or default_config; local from_store = arg[1] or "input"; local to_store = arg[2] or "output"; config = {}; local config_env = setmetatable({}, { __index = function(t, k) return function(tbl) config[k] = tbl; end; end }); -local config_chunk, err = loadfilein(config_file, config_env); +local config_chunk, err = envloadfile(config_file, config_env); if not config_chunk then print("There was an error loading the config file, check the file exists"); print("and that the syntax is correct:"); -- cgit v1.2.3