aboutsummaryrefslogtreecommitdiffstats
path: root/tools/migration/migrator
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-06-02 17:18:23 +0100
committerMatthew Wild <mwild1@gmail.com>2011-06-02 17:18:23 +0100
commitaded9653e0f6de4b5e950230c41e3a16e8dff7ea (patch)
tree32f2a8d70d9691cba9b40c9306c1e390de742187 /tools/migration/migrator
parent0193bc555b8c9c4751311967e7ec951641818c65 (diff)
downloadprosody-aded9653e0f6de4b5e950230c41e3a16e8dff7ea.tar.gz
prosody-aded9653e0f6de4b5e950230c41e3a16e8dff7ea.zip
migrator/prosody_files: Don't choke on empty data stores for a user (thanks @eoranged)
Diffstat (limited to 'tools/migration/migrator')
-rw-r--r--tools/migration/migrator/prosody_files.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/migration/migrator/prosody_files.lua b/tools/migration/migrator/prosody_files.lua
index 4e42f564..be0c49f8 100644
--- a/tools/migration/migrator/prosody_files.lua
+++ b/tools/migration/migrator/prosody_files.lua
@@ -98,7 +98,12 @@ function reader(input)
local x = iter();
if x then
dm.set_data_path(path);
- x.data = assert(dm.load(x.user, x.host, x.store));
+ 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);
+ end
return x;
end
end;