aboutsummaryrefslogtreecommitdiffstats
path: root/tools/migration/prosody-migrator.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-02-04 01:08:27 +0100
committerKim Alvefur <zash@zash.se>2017-02-04 01:08:27 +0100
commite902bcea2ee39bf7fdeda44d9f28dd8c893084d7 (patch)
tree300927642fc0f857d9ea96ab4b1e2bc2d4c20950 /tools/migration/prosody-migrator.lua
parentf01dafc6febdb8e36bfe475853f8e1d4b6ccf8cd (diff)
parent0e99534951484e5c1ab98897272c92ea6b13f8ff (diff)
downloadprosody-e902bcea2ee39bf7fdeda44d9f28dd8c893084d7.tar.gz
prosody-e902bcea2ee39bf7fdeda44d9f28dd8c893084d7.zip
Merge 0.10->trunk
Diffstat (limited to 'tools/migration/prosody-migrator.lua')
-rw-r--r--tools/migration/prosody-migrator.lua11
1 files changed, 1 insertions, 10 deletions
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:");