aboutsummaryrefslogtreecommitdiffstats
path: root/tools/migration
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-01-12 06:27:55 -0500
committerMatthew Wild <mwild1@gmail.com>2014-01-12 06:27:55 -0500
commitf240b6bd4dcc33c040ca3913ce54d3d31c4dbf1b (patch)
tree961993cab2a02c20c789b381d93a74a8d74164fe /tools/migration
parent667f75150d48db1815d8566228a41e9290fe163e (diff)
parent6a177d7ad6517cd53943c4e03d2bac578d251108 (diff)
downloadprosody-f240b6bd4dcc33c040ca3913ce54d3d31c4dbf1b.tar.gz
prosody-f240b6bd4dcc33c040ca3913ce54d3d31c4dbf1b.zip
Merge 0.10->trunk
Diffstat (limited to 'tools/migration')
-rw-r--r--tools/migration/migrator/prosody_files.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/migration/migrator/prosody_files.lua b/tools/migration/migrator/prosody_files.lua
index 4462fb3e..c9367d9c 100644
--- a/tools/migration/migrator/prosody_files.lua
+++ b/tools/migration/migrator/prosody_files.lua
@@ -13,6 +13,7 @@ local next = next;
local pairs = pairs;
local json = require "util.json";
local os_getenv = os.getenv;
+local error = error;
prosody = {};
local dm = require "util.datamanager"
@@ -95,15 +96,18 @@ function reader(input)
local iter = mtools.sorted {
reader = function()
local x = iter();
- if x then
+ while x do
dm.set_data_path(path);
local err;
x.data, err = dm.load(x.user, x.host, x.store);
if x.data == nil and err then
- error(("Error loading data at path %s for %s@%s (%s store)")
- :format(path, x.user or "<nil>", x.host or "<nil>", x.store or "<nil>"), 0);
+ local p = dm.getpath(x.user, x.host, x.store);
+ print(("Error loading data at path %s for %s@%s (%s store): %s")
+ :format(p, x.user or "<nil>", x.host or "<nil>", x.store or "<nil>", err or "<nil>"));
+ else
+ return x;
end
- return x;
+ x = iter();
end
end;
sorter = function(a, b)