projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ab9f90
)
migrator/prosody_files: Don't choke on empty data stores for a user (thanks @eoranged)
author
Matthew Wild
<mwild1@gmail.com>
Thu, 2 Jun 2011 16:18:23 +0000
(17:18 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Thu, 2 Jun 2011 16:18:23 +0000
(17:18 +0100)
tools/migration/migrator/prosody_files.lua
patch
|
blob
|
history
diff --git
a/tools/migration/migrator/prosody_files.lua
b/tools/migration/migrator/prosody_files.lua
index 4e42f564a2d7416fff52897e0e30d5c3a53b14c8..be0c49f84058abbbe64526b7a188ea21bec2c360 100644
(file)
--- 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;